Oizom Wiki
  • Oizom Wiki
  • Oizom Terminal
    • Resources
    • Application Architecture
    • Development Info
    • Coding Structure
    • Directory Structur
    • Features
    • WebSocket
    • API Server
    • Database
  • Oizom Products
    • Polludron V1
    • Polludron V2
    • Polludron V3
    • Community
  • OIZOM Product 4-in-1 manual
Powered by GitBook
On this page
  • Database Constraints
  • Users table
  • Devices table

Was this helpful?

  1. Oizom Terminal

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 } )

PreviousAPI ServerNextOizom Products

Last updated 6 years ago

Was this helpful?