Skip to content

Latest commit

 

History

History
executable file
·
29 lines (22 loc) · 823 Bytes

w08d1.md

File metadata and controls

executable file
·
29 lines (22 loc) · 823 Bytes

Assessment

Week 8

Day 1

Questions
  • What is MongoDB?
  • Why do we need a Database?
  • What format does MongoDB use to store data?
  • What's the differences between relational Database and a document database?
  • Please explain pros and cons for NoSQL
Exercise

** Submit the commands required to make this happen **

  1. Create a new MongoDB Database in your computer named w8d1
  2. Create a animals collection within it
  3. Add 3 animals with different attributes to the collection
  4. Create a owners collection
  5. Add 3 owners with different attributes to the collection
  6. Add 1 animal to each owner:
  • one by reference
  • one embedded

BONUS

  • Update all animals to include the number of legs each one has
  • Write a query that will return how many animals have at least 4 legs