MongoDB

it19167992 Wanigasekara S V
2 min readApr 14, 2021

Introduction

Mongo DB is a NoSQL Documentation database. It is open source. In mongo DB storage is Encrypted. Mongo DB is powerful acid transaction supports newer version. It used SpiderMonkey Java Script engine. In Mongo DB Document Maximum size is 16MB. so document should be less than 16MB.MongoDB has Strong query capabilities with aggregations using JavaScript. MongoDB has one single writer that called one master, Master data is highly consistent Instance and Secondary Instance are Eventually consistent not highly consistence. MongoDB kind of like JSON But it can save more data types than JSON.

MongoDB Features

MongoDB has its own encryption mechanism. Its storage structures everything is encrypted. So no one can files out of it and decrypt and see what types of data it save.so that we called as encryption at rest. MongoDB Enterprises Edition supports then Encryption at rest as out of box feature .But community edition not have that Encryption feature.

MongoDB has multi document transactions. also it have different types of Indexes. these are Single Field, Compound, Multikey and Text Indexes and Unique, Partial, Sparse and TTL properties. Single Field Index supports one type of query and compound index supports multiple queries. In industry use compound index than single index. Multikey is an array. Text index has language specific capabilities. sparse Index special for MongoDB. Even if the index field contains a null value, Sparse indexes only contain entries for documents that have the indexed field. TTL is Time To Live. In TTL we can set time on document. After that time MongoDB erase that document.

MongoDB supports two main storage engines.one is wired tiger storage engine which is default data engine that saves data files and other things. Another one is In memory storage. It is newer one. The data base operates In memory. It may have caching capabilities rather than persistence capabilities. Because In memory database in MongoDB cannot persist data. It is one feature given by MongoDB. Replica set is nice distributed structures that MongoDB introduced.

MongoDB have sharding Feature. That feature have all databases. Sharding is structure where save different data based on some logic, some data specification on different instances.

eg:- Sharding logic is Geographical location. If we have multiple instances we can save data according to geographical location in different instance. If user is on Asia that data save on one Instance If user is Australia another instance.

In MongoDB have queries such as insert, update ,remove and find.

--

--