Monday, November 20, 2017

Mongo Creating the Database and adding records--morning

Here are the JSON records we created

zoo
animals
[{
  name : "Zack the Zebra",
  type : "Zebra",
  habitat : "African Savannah",
  age : "5 years",
  diet : "grass"
},
{
  name : "Ellie the Elephant",
  type : "Indian Elephant",
  habitat : "East Asian Jungle",
  age : "22 years",
  diet : "Peanuts"
},
{
  name : "Gennie the Giraff",
  type : "Giraff",
  habitat : "African Savannah",
  diet : "leaves"
}]

habitats
[{
   name : "African Savanah",
   description : "grass trees and exotic animals",
   inhabitants : ["Zack the Zebra", "Gennie the Giraff"]
},
  
{
   name : "East Asian Jungle",
   description : "Wet tropical, palms and ferns",
   inhabitants : "Ellie the Elephant"
}]
  

A picture of the insert of animals

Afternoon class

productReviews
products
[
{
   name : "Ipad",
   maker : "Apple",
   price : 830.99,
   color : "silver",
   quantity : 14, 
   rating : [4,3,5,3, 5]
},
{
   name : "Apple Watch",
   maker : "Apple",
   price : 400.99,
   color : ["silver","white", "black"],
   quantity : 20,
   rating : [4,3,5,3,5,2,5]
},
{
   name : "Surface",
   maker : "Microsoft",
   price : 1200.99,
   color : ["blue","white", "black"],
   quantity : 5 
}
]

reviews
[{
    email : "spconger@gmail.com",
    product : "Ipad",
    date : "11/20/2017",
    rating : 4,
    review : "Ipads are fun but hard to do real work on" 
},
{
   email : "Joe@msn.com",
   product : "Surface",
   date : "11/20/2017",
   rating : 4
}]

No comments:

Post a Comment