MongoDB is a document database with the scalability and flexibility that you want with the querying and indexing that you need.
ObjectIds are small, likely unique, fast to generate, and ordered. ObjectId values consist of 12 bytes, where the first four bytes are a timestamp that reflect the ObjectId’s creation. Specifically:
- 4-byte value representing the seconds since the Unix epoch,
- 3-byte machine identifier,
- 2-byte process id, and
- 3-byte counter, starting with a random value.
In MongoDB, each document stored in a collection requires a unique _id field that acts as a primary key. If an inserted document omits the _id field, the MongoDB driver automatically generates an ObjectId for the _id field.
Views : Creating read-only views from existing collections or other views.
Capped Collection : Capped collections are fixed-size collections that support high-throughput operations that insert and retrieve documents based on insertion order. Capped collections work in a way similar to circular buffers: once a collection fills its allocated space, it makes room for new documents by overwriting the oldest documents in the collection.
Data Models & Schema Validation : MongoDB provides the capability to perform schema validation during updates and insertions.
References, Transactions, Indexes, Security, Replication, Sharding.....
Loopback (npm install -g loopback-cli)
The Node.js API Framework
- Quickly create dynamic end-to-end REST APIs.
- Connect devices and browsers to data and services.
- Use Android, iOS, and AngularJS SDKs to easily create client apps.
- Add-on components for file management, 3rd-party login, and OAuth2.
- Runs on-premises or in the cloud
- Easy-to-use CLI wizard
- Create models based on your schema if you have one
- Create dynamic models if you don't
- Built-in API Explorer
Set up models and create REST APIs in minutes
- Define hasMany, belongsTo, hasAndBelongsToMany relationships
- Automatically generates corresponding relational REST endpoints
Model relation support
- Built-in role-based access controls
- oAuth user and registration models baked in
- Add custom policies using CLI or JSON
- Browser support (JSONP and CORS)
Easy authentication and authorization setup
- MySQL, Oracle, MongoDB, Postgres and others
- Other REST services
- Discovery APIs for Oracle, MySQL, PostgreSQL and SQL Server
Connect to backend data stores
- Run dynamic queries on devices, browsers and the server
- Support for NoSQL-style queries against relational databases
Run Ad-hoc queries