Database – OLTP vs OLAP – MongoDB

databasedatabase-designmongodbnormalizationrdbms

RDBMS design often emphasizes data normalization (especially 3 NF) for the sake of efficient transaction processing (OLTP). OLTP is the predominant use case for an RDBMS.

Goals of Normalization in RDBMS:

  • Free the database from modification anomalies

  • Minimize re-design when extending

  • Avoid bias toward any particular access pattern of an application


On the contrary, the single most important factor in designing the application database schema with MongoDB is about, matching the data access patterns of your application.

OLAP – Online Analytical Processing, aka reporting is generally performed on databases that have been de-normalized to facilitate OLAP as opposed to OLTP.


MongoDB not being an RDBMS,

Question:

Is MongoDB not recommended for OLTP processing?

Is MongoDB recommended for OLAP processing?

Best Answer

With NOSQL dbs you have a completely different paradigm from the way people expected to use relational databases.

NOSQL is very much designed as a persistence layer for an application. So access is optimised for a single object with children.

Relational DBs were designed to be an application in themselves, ensuring the data is consistent and allowing applications to perform aggregate queries to pull back data constructed from multiple records.

So I would say that OLAP and OLTP dont apply to nosql dbs. You could say 'they are not recommended' but I think it would be more accurate to say that they simply don't apply at all.

Related Topic