Designing a database model

If you have a vending machine with various products and payment methods, it's recommended you use a database to store all transactions in the vending machine.

Three data points that you should take care about are product, transaction, and machine vending capabilities. In general, we can describe the core database design as follows:

The Product table consists of product information, including quantity and price. If you look at the schema in the figure, there are two fields: product_code and product_vending_code. product_code is the internal manufacturing identity that the system will use for all transactions. You ...

Get Intelligent IoT Projects in 7 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.