Database Reference
In-Depth Information
Business unIntelli-
gence
Data Warehouse, Business
Intelligence
Insight and Innovation beyond Analytics and Big Data
442
Secrets of Analytical
Leaders
268
Analytics
Here is the statement to add these three new titles to our topic collection:
db.book.insert( [ { titleName : “Extreme Scoping”,
subtitleName : “An Agile Approach to Enterprise Data Warehousing and Business Intelligence”,
pageCount : 300,
categories : [ “Agile”, “Business Intelligence” ]
},
{
titleName : “Business unIntelligence”,
subtitleName : “Insight and Innovation beyond Analytics and Big Data”,
pageCount : 442,
categories : [ “Data Warehouse”, “Business Intelligence” ]
},
{
titleName : “Secrets of Analytical Leaders”,
pageCount : 268,
categories : [ “Analytics” ]
} ] )
Note that not all documents have to contain all fields since the third book does not have a
subtitle. Also note how easy it is to add multiple values for a single field through an array
as in adding the topics' categories. Let's do another find( ) and see what comes back:
db.book.find( )
And this is what is returned:
{ “_id” : ObjectId(“530f8be4d77a08823086017c”), “titleName” : “Data Modeling for MongoDB” }
{ “_id” : ObjectId(“530f8be4d77a08823086017d”), “titleName” : “Data Modeling Made Simple” }
{ “_id” : ObjectId(“530f8be4d77a08823086017e”), “titleName” : “Extreme Scoping” }
{ “_id” : ObjectId(“530f8be4d77a08823086017f”), “titleName” : “UML Database Modeling Workbook” }
Search WWH ::




Custom Search