CIS 333 Quiz4 F2017 Answers.pdf

CIS 333 Quiz4 F2017 Answers.pdf - Name CIS 333 Quiz 4...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Name__________________________ CIS 333 Quiz 4 Answers Page 1 of 2 DGB Thursday, October 26, 2017 dgb CIS 333 Quiz 4 Answers (80 points) Fall 2017 3. At the mongo prompt create a database called StudentBase. (5 points) use StudentBase 4. Using the data shown in the following table write 5 statements to insert each record into a collection called students . The first row of the table refers to the field names for each record. (25 points 5 points each) studentName studentId examScore Bugs Bunny 12345 90 Daffy Duck 23456 50 Donald Duck 34567 75 Mickey Mouse 45678 95 Minnie Mouse 56789 100 db.students.insert({studentName:"Bugs Bunny", studentId: 12345, examScore: 90}) etc .... 5. List all of the records in the students collection in a nice form without showing the ids. (5 points) db.students.find({}, {_id:0}).pretty() 6. List all of the records in the students collection in a nice form showing only the names and exam scores. (5 points) db.students.find({}, {_id:0, studentName:1, studentId:1}).pretty() 7. List all of the information in the record for Mickey Mouse in a nice form without showing the id. (5 points) db.students.find({studentName: "Mickey Mouse"}, {_id:0}).pretty()
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern