2

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?

  • 1
    MongoDB is not a RDBMS. It is a document database. So you ask the wrong question. The question should be: Is my usecase more suitable to a RDBMS or adocument database? – Timothy Truckle Aug 20 '17 at 9:03
  • @TimothyTruckle I know oltp is suitable for rdbms. Yes mongoDB is NoSQL but not RDBMS – user1787812 Aug 20 '17 at 9:30
  • 1
    Google for "using nosql for olap", and you will find some interesting articles an Quora, – Doc Brown Aug 20 '17 at 10:31
  • (If you're into the NoSQL approach, have you looked at RethinkDB?) – 9000 Aug 20 '17 at 16:08
4

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.

  • Transaction is now possible with a plugin in MongoDB, tokutek. This ensures data consistecy. Did u get the chance to see that? – user1787812 Aug 20 '17 at 9:37
  • So, do u think NoSQL(MongoDB) is more than persistence layer for the application? $lookup in mongo 3.2 used for join operations – user1787812 Aug 20 '17 at 9:44
  • 1
    Btw, why olap require data consistency? Unlike oltp – user1787812 Aug 20 '17 at 9:46
  • they are adding more traditional features to nosql dbs, these are useful workarounds, but if you use them a lot then you are better off switching to an rmdb. – Ewan Aug 20 '17 at 11:15
  • 1
    any aggregate or lookup functionality – Ewan Aug 20 '17 at 13:30
0

Is MongoDB not recommended for OLTP processing?

No, I would not say it's not recommended; it has some pros (simpler scaling / geographic distribution (if you do need it - most orgs don't), no need to design a relational schema), and some cons (lack of relational schema and SQL, less mature).

Is MongoDB recommended for OLAP processing?

No, you'll probably find yourself in need of replicating some data to an engine more suited for analytics eventually.

  • I would say mongo can used for online processing. The reason why OLTP on RDBMS is often on the 3rd normal form is for data consistency. If we can ensure consistency in Mongo (which we can by now), I see no reason to not to used for OLTP. But for OLAP, that's another story: imaginarycloud.com/blog/oltp-vs-olap – Tiago Franco Jun 6 at 23:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.