Monday, March 6, 2017

NoSQL Collections and JSON


Showtracker  --Track shows venues artists reviews
Bookreviews --Books Reviewers authors Genre Reviews
JSON
bookCollection
[
{
  _id : 1,
  title : "The Philosopher's Stone",
  releaseDate : "1997",
  isbn : "54546525775",
  author : "J.K. Rowling",
  genre : ["fantasy", "young adult"],
  description : "fantasy about a boy who finds out he is actually a wizard."
},
{
   _id : 2,
   title : "Nebula Award Winners 2017",
   releaseDate : "2017",
   isbn: "349834943290",
   author: [
             "Neil Gaimen",
             "Ben Bova",
             "Wesley Chu",
             "William Gibson"
            ],
   genre : "Science Fiction",
   description: "A collection of award winning SF stories"
}
]

authorCollection

  {
    _id : 1,
    authorName : "J.K. Rowling",
    country : "England",
    books : [
              {_id : 1, title : "The Philosopher's Stone", releaseDate : "1997"},
              {_id : 3, title : "The Chamber of Secrets", releaseDate : "1999"},
              {_id : 4, title : "Prisoner of Askaban", releaseDate : "2000"},
              {_id : 5, title : "The Casual Vacancies", releaseDate : "2010"}
      ]
   }

reviewerCollection
{
  _id : 1,
  name : "Steve Conger",
  email : "spconger@gmail.com"
  
}

reviewCollection
{
   _id : 1,
   bookId : 1,
   bookTitle : "The Philosopher's Stone",
   bookAuthor : "J. K. Rowling",
   reviewDate: "3/6/2017",
   reviewAuthor : {_id : 1, name: "Steve Conger"},
   rating : "4",
   title : "the beginning of a long series",
   review : " fdsjldfsjljfl;dsjfds;ljsda"
}




No comments:

Post a Comment