Relations In NoSQL

Relations In NoSQL
0

Hey guys, I’m thinking about starting with NoSQL. I have heard that it is poor at handling relational data, but it appears to me as though relations can be handled with these JSON like objects. If this is the case, what exactly is the downside of using a NoSQL database? Why would anyone prefer a relational database like that of MySQL?

NoSQL document databases like MongoDB do easily express some types of relations, such as one-to-one and one-to-many. Other relation types like many-to-many are better suited for relational databases. A relational database gives you more control over how your data is laid out and indexed, offers transactions for strongly enforcing data integrity, and some databases support creating new datatypes and operators.

NoSQL databases these days are picking up RDBMS features like transactions, and many SQL databases have added json datatype support, so the lines between the two have been getting blurrier lately.

1 Like