Does nosql (e.g. mongodb) use development productivity gains?

I develop 3 to 4 Spring Roo applications per year with Hibernate and MySQL. Stackoverflow states that relational databases are not suitable for a typical object-oriented web application.

If your DB is 3NF and you are not making any connections (you just select a bunch of tables and combine all the AKA objects that most people do in the web application), MongoDB will probably hit you in the ass.

There are various reasons for this. One of them is performance, because objects are mapped to a relational schema ("connected," etc.). Will using MongoDB or CouchDB improve development productivity with the same level of knowledge as in MySQL?

+6
source share
1 answer

I think it really depends on the web application. Non-relational databases (NoSQL) are different in that you or

  • Do not want to use a schema (you want to be able to store different types of data in one table) and / or
  • The connection between objects is not too complicated.

NoSQL can definitely make it easier to slip away from the earth because you can just throw things as you want, but on the other hand, as the situation gets more complicated, sometimes you need a little more forceful organization. Foreign keys - this is what I really miss when working with Mongo, just the ability (using ORM) to jump from one object to the corresponding one or many of them are fine. (Yes, in many NoSQL dbs you can store documents, but at some point you need to use a separate table for something.)

I highly recommend NoSQL for a brochure style website where the client simply enters text fields or a twitter style website where you basically store a lot of the same data type with few attributes. But if you are going to create a CMS with revisions and workflow, etc., you will need the ability to have explicit relationships in SQL.

Which brings me to my answer: use the right tool for the job. A trained developer will be able to make some sites with SQL and other sites faster and better with a non-relational database faster and better.

But try MongoDB or CouchDB and feel it, so you will have better intuition about when to use what. (We use both at my work (not at the same time!) Depending on the project)

+7
source

Source: https://habr.com/ru/post/897888/


All Articles