An order management system has, as a minimum, data structures representing products available for sale (inventory) and orders. To support the Apple Pay workflow, the system should also have a structure representing the supported shipping methods. The example project uses a MongoDB database to store this data, and the Mongoose data modeling module for Node.js. MongoDB is a document-based database system. Mongoose makes it easier to create documents from schemas and access the data in these documents.
The database for the example order management system has three collections: Product
, ShippingMethod
, and Order
. A collection is similar to a table in a relational database system.
The Product
collection stores information about each product offered for sale. The following table shows the fields available for product records within the collection: