Are you looking at NoSQL databases for incorrect reasons?

Source: Internet
Author: User
Source: maurizioturatti. comblog20150106using-nosql-wrong-reason I recently saw a report that PostgreSQL beat MongoDB in many important places under certain conditions, which reminds me of the theory behind different options in terms of data storage selection, especially in SQL and NoSQL Solutions

Source: http://maurizioturatti.com/blog/2015/01/06/using-nosql-wrong-reason/ I recently saw a report that PostgreSQL is better than MongoDB in many important places under some conditions, this reminds me of the theories behind different options for data storage, especially SQL and NoSQL solutions.

Source: http://maurizioturatti.com/blog/2015/01/06/using-nosql-wrong-reason/

I recently saw a report that PostgreSQL is better than MongoDB in many important aspects under certain conditions, which reminds me of the theories behind different options in data storage selection, especially the naive comparison between SQL and NoSQL solutions-unfortunately, this often happens.

The above evaluation was created by EnterpriseDB. EnterpriseDB is a commercial company that develops PostgreSQL (so the evaluation may be biased ......), In addition to this obvious fact, I have noticed that PostgreSQL is a surprising product. In this regard, I recommend it as one of the most urgent and optimal solutions for most data storage problems. Well-known enterprises with extraordinary performance requirements are investing heavily in PostgreSQL.

However, my opinion here is slightly different: I asked myself whether most companies correctly view the "NoSQL" solution and whether performance requirements have become an urgent concern for them. For example, let's take a look at the interpretation of the MongoDB entry on Wikipedia. It is a database that I often use these days:

MongoDB is a cross-platform document-oriented database. As a NoSQL database, MongoDB does not adopt a traditional table-based relational database structure, but prefers JSON-like documents with dynamic models (called BSON by MongoDB ), this makes data integration in specific applications easier and faster.

I want to deliberately emphasize "specific types of applications" in the sentence, because this is exactly what I want to say: you cannot simply discard relational databases because of performance, instead use document-oriented databases, this is a silly motive: a SQL database can process more than 14000 transactions per second, so if you exceed this level, it means you are already in the first-class company, there are primary expansion requirements: Congratulations!

On the contrary,

When most entities are related to the tree structure and the relational model is forced to create a join or severe anti-normalization relationship, beyond its rationality, the document database is a better solution than the relational database.

In this case, the data model conforms to the preceding constraints, so the document-oriented structure has the ability to create fewer and do not match the object-oriented design than the relational model. As far as we know, all important relational database models have created a large number of attributes related to the Object model. This is the criticized Object-relational impedance mismatch problem. The object-oriented system is usually a tree structure, which can better adapt to the document database than other models, except for graph database [NOTE 1]. Obviously, graph database implements most of the common performance of a graph.

In addition to the SQL field, I always recommend that you and your team do not underestimate the fact that you and your team are losing most of the tested tools and expertise that you are unconsciously using every day. I have seen a lot of people extract very basic information from the NoSQL warehouse, and this information can be easily implemented using relational databases, mainly because people have been doing this for many years. Therefore, NoSQL databases differ significantly from "Orthodox" relational databases in terms of management transactions: Use Eventual Consistency and Idempotent Services) do you know what it means to design an application?

I am not saying that you should not adopt new technologies, because my company and I have done a lot for this, but my final suggestion is:

Use a data storage solution suitable for your domain model [NOTE 2]. Do not optimize the performance too early: You may try to solve the problem.

  • Note 1: Graph databases are also called Graph-oriented databases. Graph databases are used in English. The basic meaning of graph database is to store and query data in a data structure such as "Graph", rather than a database that stores images. The basic storage units of graph databases are nodes, links, and attributes. Http://zh.wikipedia.org/wiki/%E5%9B%BE%E6%95%B0%E6%8D% AE %E5%BA%93
  • Note 2: The domain model can be viewed as a conceptual model of a system. It is used to visually describe the entities in the system and their relationships. Domain Models record key concepts and vocabulary in a system, display the relationships between the main entities in the system, and determine their important methods and attributes. Therefore, the domain model provides a structured view of the entire system, corresponding to the dynamic view described in the use case. One advantage of domain models is that they describe and limit system boundaries. Http://zh.wikipedia.org/wiki/%E9%A2%86%E5%9F%9F%E6%A8%A1%E5%9E%8B

The post you are looking at The NoSQL database for The wrong reason? Appeared first on LABA porridge.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.