Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the concept of NoSQL?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today, the editor will share with you the relevant knowledge of what the concept of NoSQL is. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.

With the rapid development of NoSQL and because NoSQL does not define the organization of data as relational as the traditional database, as long as the internal data organization adopts a non-relational way, it can be called NoSQL database. So it brings hundreds of so-called NoSQL databases in the open source community, which is dazzling. There is no clear scope or definition for NoSQL, but they all share the following common features:

There is no need for predefined schemas: there is no need to define data schemas in advance and predefine the table structure. Each record in the data may have different properties and formats. When inserting data, you do not need to define their schemas in advance.

Flexible scalability: nodes can be dynamically added or deleted while the system is running. No downtime maintenance is required, and the data can be migrated automatically.

Distributed: instead of storing the data on the same node, the NoSQL database needs to partition the data and distribute the records on multiple nodes. And usually partition and copy at the same time. This not only improves the parallel performance, but also ensures that there is no single point of failure.

BASE: compared to the strict ACID feature of transactions, the NoSQL database guarantees the BASE feature. BASE is the ultimate consistency and soft transaction.

NoSQL advantages: avoid unnecessary complexity, high throughput, high level of scalability For example, with the rise of the Internet web2.0 website, the traditional relational database has been unable to cope with the web2.0 website, especially the super-large-scale and highly concurrent SNS type web2.0 pure dynamic website, which has exposed many insurmountable problems, while the non-relational database has developed rapidly because of its own characteristics. The emergence of NoSQL database is to solve the challenges brought by large-scale data collection and multiple data types, especially the application problem of big data.

NoSQL disadvantages: the data model and query language are not validated by data, and there is no solid theoretical foundation; ACID features are not supported, of course, SQL database can be used to solve this problem; some NoSQL databases are too simple, such as Memcache is only an in-memory database, suitable for some characteristic scenarios; the biggest disadvantage is that there is no unified data query model, and each NoSQL product has its own language usage.

Because the NoSQL database does not have a unified architecture, the difference between the two NoSQL databases even far exceeds the difference between the two relational databases. It can be said that NoSQL has its own advantages, and a successful NoSQL must be particularly suitable for certain situations or applications, which will be far better than relational databases and other NoSQL.

What is NewSQL?

By comparison, we can find that the opposition between NoSQL and SQL is too strong, based on some differences between NoSQL and SQL, for example, some features of NoSQL do not have SQL, such as distributed and simple data model, while some features of SQL do not have NoSQL, such as ACID function. Of course, no matter which kind of database, regardless of its disadvantages or advantages, there are applicable scenarios. The reason why it is difficult for SQL to be distributed lies in the log mechanism, lock mechanism and buffer management mechanism of SQL itself. Then came the concept of NewSQL database, what is the so-called NewSQL? Just want to soften the unique features of SQL and NoSQL.

At present, there are about two types of NewSQL. The first is to have relational database products and services, and bring the benefits and advantages of relational database to the distributed architecture. To put it simply, it is to introduce ACID into the distributed architecture. The second category is to provide the performance of relational database, to achieve a way that does not need to consider horizontal expansion, simply to change the SQL architecture so that it does not need to scale horizontally, does not have to run in a distributed environment to bring performance improvement. For the first category of products that introduce ACID into distribution, there are Clustrix, GenieDB, ScaleArc, ScaleBase, NimbusDB and MySQL Cluster.

The classification of NoSQL?

Generally speaking, today's database market is in full bloom, roughly classified as SQL, NoSQL, NewSQL and cached database systems. SQL and NewSQL are not the topics discussed in this chapter, so let's talk about the NoSQL database.

First of all, it needs to be clear that NoSQL database is not to replace the widely used traditional database, but to solve the problem of data storage and calculation in a non-relational way. At present, many NoSQL databases can be classified according to their internal data organization as follows:

Key value (Key-Value) storage database

This type of database mainly uses a hash table with a specific key and a pointer to specific data. The advantage of Key-value model for IT system is that it is simple and easy to deploy. But if DBA queries or updates only some of the values, Key-value is inefficient.

Data model: key-value

Advantages: fast search speed

Disadvantages: data is unstructured and is usually treated only as string or binary data

Application scenarios: content caching

Typical products: Tokyo,Redis (multiple values with one button), Dynamo, Oracle BDB, and Memcache (with one key, one value), but Memcache is Key-avlue storage but it is a cache database.

Column storage database

As the name implies, data is stored in columns. The biggest feature is that it is convenient to store structured and semi-structured data, and it is convenient to do data compression. It has great IO advantages for queries against a certain column or columns.

Data model: data is stored in columns, the same column of data is stored together

Advantages: rapid search, strong scalability, easy to implement distributed

Disadvantages: the function is very limited compared to SQL

Application scenarios: distributed file system or distributed storage

Typical products: Cassandra, HBase, Bigtable

Document database

The document database is inspired by Lotus Notes office software, and it is similar to the first key-value storage. This type of data model is a versioned document, with semi-structured documents stored in a specific format, such as JSON. A document database can be seen as an upgraded version of a key-value database, allowing nesting of key values between them. And the query efficiency of document database is higher than that of key database.

Data model: similar to the key-value model, but value points to a container (document) with a set of information in the container

Advantages: the data format is not strict, there is no need to define the structure in advance, and each document field is arbitrary.

Disadvantages: poor query performance (maybe slightly better than SQL) and lack of uniform query syntax

Application scenario: you can use it as long as you don't need ACID.

Typical products: CouchDB, MongoDB, there is also a domestic document database SequoiaDB, has been open source

Schema database

The database of graphic structure is different from the SQL database of other rows and rows and rigid structure, it uses flexible graphical model and can be extended to multiple servers. NoSQL database does not have a standard query language (SQL), so it is necessary to develop a data model for database query. Many NoSQL databases have REST-style data interfaces or query API.

Data model: Graph structure model

Advantages: using graph structure correlation algorithms to improve performance and meet the application needs of special scenarios

Disadvantages: limited functionality and difficulty in distributed implementation

Application scenario: social network recommendation system, such as friend recommendation function, relationship graph

Typical products: Neo4J, InfoGrid, Infinite Graph

Therefore, we conclude that the NoSQL database is applicable in the following situations:

\ 1. The data model is relatively simple

\ 2. Need a more flexible IT system

\ 3. High performance requirements for database

\ 4. No need for a high degree of data consistency

\ 5. For environments where it is easier to map complex values for a given key.

These are all the contents of the article "what is the concept of NoSQL?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report