Database
As oizom devices (IoT Devices) are sending data using MQTT protocol, schema of database documents/entries are hard to design. That's why the No-SQL approach. here's the information about database design.
Database
MongoDB
Database version
3.4
Database Cluster
Sharded MongoDB Cluster
Backup Mechanism
RAID 5
Database Constraints
MongoDB version 3.4 is the current database management system in oizom private apis. APIs will be sent to express.js api server and that will eventually fetch respective data from MongoDB which will be sent to http clients.
Users table
Oizom database is having unique user as per email. So, unique index is on for users
will be "email" key.
db.users.createIndex( { "email": 1 }, { unique: true } )
Devices table
Oizom database is having unique device as per user registered via webapp or mobile app. So, unique index is on for devices
will be composition key "deviceId" and "userId". According this one user can register device once only to avoid duplications.
db.devices.createIndex( { "deviceId": 1, "userId": 1 }, { unique: true } )
Last updated