Question: For each situation presented below, illustrate a document as depicted in Figures 10-4 and 10-5 and specify whether it contains an array, an embedded subdocument,

For each situation presented below, illustrate a document as depicted in Figures 10-4 and 10-5 and specify whether it contains an array, an embedded subdocument, relationships, or collections. Use hypothetical data and make necessary assumptions.

a. A document containing Books details: Title, Publisher, Year, and Edition.

b. Add Author name: First name and Last name to the document and specify the type of document.

c. Now add “Sales Region,” which has the subfields “Region” and “RCode” and can take values of “NorthEast,” “SouthWest,” “SouthEast,” and “01,” “02,” “03,” respectively. Is this an array?

d. Assume that each book is reviewed by many Reviewers. Reviewer details—ID, Name (First and Last), Experience—are in a separate document. Present this relationship in a document.

Figure 10-4

(a)

{ "_id" : 1, //1. identifier for the document "name" : {

"first" : "John", "last" : "Backus" }, "birth" : ISODate("1924-12-03T05:00:00Z"), "death" :

(b)

ISODate("2007-03-17T04:00:00Z"), "contribs" : [ "Fortran", "ALGOL", "Backus-Naur Form", "FP" ], "awards" :

Figure 10-5

(a)

[ { "award" : "W.W. McDowell Award", "year" : 1967, "by" :

(b)

"IEEE Computer Society" },

{ "_id" : 1, //1. identifier for the document "name" : { "first" : "John", "last" : "Backus" }, "birth" : ISODate("1924-12-03T05:00:00Z"), "death" : ISODate("2007-03-17T04:00:00Z"), "contribs" : [ "Fortran", "ALGOL", "Backus-Naur Form", "FP" ], "awards" : [ { "award" : "W.W. McDowell Award", "year" : 1967, "by" : "IEEE Computer Society" },

Step by Step Solution

3.52 Rating (169 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

ANSWER The document will look like this id 1 SalesRe... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Modern Database Management 13th Edition Questions!