December 2017
Intermediate to advanced
316 pages
6h 58m
English
Up until now, we have seen how to interact with MongoDB and perform CRUD operations for our REST API. Here, we are going to define a real-world JSON document that can be implemented by MongoDB. Let us lay down the design of JSON for an e-commerce problem. These five components are a must for any e-commerce design:
Let us see a schema of each and every component:
Product:
{ _id: ObjectId("59603d3b0f41ead96110cf4f"), sku: 1022, slug: "highlander-shirt-223", name: "Highlander casual shirt", description: "A nice looking casual shirt for men", details: { model_number: 235476, manufacturer: "HighLander", color: "light blue", mfg_date: new Date(2017, 4, 8), ...Read now
Unlock full access