To create a collection called msgs under dbs named


Assignment: Internet DB

This project is to get familiar with one noSQL DB: MongoDB.

I would like to see some screenshots that shows your work. Students can use snipping if it is in Windows to capture screenshots and paste them into word doc.

Instructions (for windows only. Linux/Mac should be similar)

Detailed instruction is in attachment.

1. download mongodb from https://www.mongodb.com/dr/fastdl.mongodb.org/win32/mongodbwin32-x86_64-2008plus-ssl-3.4.2-signed.msi/download

2. install MongoDB.

3. setup PATH environment variable to tell the operating system where to look for application, mongod or mongo in this case. If a student is not sure, googling on "setup computer ENV, PATH". Attachment 1 is a help for this.

4. make a data store for your mongoDB

Students need to make a dir under C: called myMongoDBdata that will store all the data. Here is the command (C:\ is not part of command. It shows the current directory)

C:\mongod --dbpath "C:\myMongogDBdata"

5. run mongo inside a CMD and practice the following commands to get to know more on mongo

>help

>show dbs

>show collections

>use IASPtestDB

> message = { author: "Zee Chen", date: 03/07/2014, text:"Yak", tags: ["advanture", "positive"]}

>db.t.save(message)

>db.t.find()

Submissions

1) A screenshot with CMD (may need to run as an administrator) which shows the result of typing

a) PATH

b) mongo

2. A screenshot that shows the result of the following command.

mongod --dbpath "C:\myMongogDBdata"

Answer the purpose of the above command? Why does it needed before you start mongo?

3. A screenshot of a CMD that runs mongo, and show dbs and show collections.

Answer the difference between dbs and collections

4. Create a dbs named as "IASP565DB", its collection called "smartD". You need to create a schema that can accommodate the following information: the name of a smart device, the maker of the device, the type, the date, the color and note area. You need to create five records. Write down your schema. Paste a screenshot that shows five such records.

5. To create a collection called "msgs" under dbs named "IASP565DB". You need to create a schema that can accommodate the following information. As you know, when you in the chat mood, you are constantly send out a new message, reply to a message. So each message should have a user name like 'tellthetruth', the date and the time that the chat was created, the content of the chat, a reply or several pieces of reply to this chat. Remember, each reply is just like a chat that should have all the informations. Write down your schema. Paste a screenshot that shows a chat that has one reply and another chat has two pieces of reply.

Attachment:- Assignment File.rar

Request for Solution File

Ask an Expert for Answer!!
Database Management System: To create a collection called msgs under dbs named
Reference No:- TGS02215279

Expected delivery within 24 Hours