KEMBAR78
DBCAssignment 2 | PDF | Art | Technology & Engineering
0% found this document useful (0 votes)
11 views1 page

DBCAssignment 2

The document outlines an assignment with two parts: the first part involves completing in-class tasks, and the second part involves continuing a project by designing a database schema, connecting to a MongoDB database, and setting up API routes and controllers.

Uploaded by

akhilmanual3030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

DBCAssignment 2

The document outlines an assignment with two parts: the first part involves completing in-class tasks, and the second part involves continuing a project by designing a database schema, connecting to a MongoDB database, and setting up API routes and controllers.

Uploaded by

akhilmanual3030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Database Connectivity Assignment 2:

Part 1: In-Class Tasks


You must complete these three tasks IN-CLASS on the specified day. The professor will release a
document containing the task during the lecture. If you are not in class, you will get 0 for that task.
There is no drop-box for the tasks, so you must show the professor your work before you leave.

Task 4: Connecting to a Database Hosted by MongoDB Atlas – Due: 1 mark


Task 5: Creating Documents and Schemas – Due: 1 mark
Task 6: Setting up the API – Due: 1 mark

Part 2: Main Component


1. Continue working on the project you created for the previous assignment
2. Create a model folder inside APP_SERVER and create a file for your schema
3. Design a schema for your database, you will get grades for the following:
a. Design of the database (does your design make sense?) 2 marks
b. Uses at least 1 subdocument (see Section 5.3.3) 1 mark
c. At least 5 different fields for your main data structure (I.e. book) .5 marks
d. Correct use of validation 1 mark
4. Create a database and collections on MongoDB Atlas and add sample data to it
5. Create a db.js file inside the model folder where you connect your app to the database
with Mongoose 1 mark
6. Create a new folder in the root called APP_API, with two folders inside: controllers and
routes
7. Create a file in your APP_API\controllers folder which contains placeholder functions
(NOTE: they do not need to do anything with the database) for all the major CRUD
operations (getting a list, getting a single, deleting, updating and creating) .5 marks
8. Create a file in your APP_API\routes folder which designs the routes for your api and
maps them to the correct controller 1 mark
TOTAL: 10 marks

You might also like