0% found this document useful (0 votes)
2 views2 pages

MongoDB Tutorial for DA4310 Students

This document is a tutorial for DA4310 focusing on MongoDB, where students are required to convert a relational schema into MongoDB documents and collections. It includes specific tasks such as writing MongoDB commands to represent employee and project data, fetching an employee by code, finding a project associated with an employee, and calculating the average budget of projects. Students must submit their answers in a PDF format with their index number.

Uploaded by

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

MongoDB Tutorial for DA4310 Students

This document is a tutorial for DA4310 focusing on MongoDB, where students are required to convert a relational schema into MongoDB documents and collections. It includes specific tasks such as writing MongoDB commands to represent employee and project data, fetching an employee by code, finding a project associated with an employee, and calculating the average budget of projects. Students must submit their answers in a PDF format with their index number.

Uploaded by

Jay Rajapaksha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

DA4310 Tutorial 3 – MongoDB

Index No: 19#####

Consider the following relational schema and answer the questions. Write the answers in this sheet in
the given slots and upload as pdf file with your index number. Eg: [Link]

Relational Schema:

employees
code name phone address_street address_city address_state project
101 Tom 415-983-9223 1367 Locust Drive San Jose California SN20
102 Shana 214-289-1316 683 Fancher st Dallas Texas BN4
110 Lars 970-481-8746 3035 Shobe Lane Denver Colorado BN4

projects
codenam
name budget started ended
e
SN20 Starship SN20 100,000,000 2021
2,000,000,00
BN4 Super Heavy BN4 2021
0
BFR Big Falcon Rocket 50,000,000 2017 2018

Questions:

1. Write the MongoDB commands to represent above relational data as documents and collections in
MongoDB. (Decide how you represent the relationships considering the next questions as well.)

## Your MongoDB expressions

2. Write a MongoDB command to fetch the employee with code 110

## Your MongoDB expressions

3. Write a MongoDB command to find the project employee 101 working on.

## Your MongoDB expressions

4. Write a MongoDB command to find the average budget of projects.

Department of Decision Science


DA4310 Tutorial 3 – MongoDB

## Your MongoDB expressions

Department of Decision Science

You might also like