Introduction to the Venice Source Code and Nosql

NoSQL (Not Only SQL), which means “not just SQL”, is a brand-new revolutionary database movement. It was proposed in the early days, and the trend has been increasing until 2009. Proponents of NoSQL advocate the use of non-relational data storage. Compared with the overwhelming use of relational databases, this concept is undoubtedly an injection of a new kind of thinking. Venetian source code to build QQ: 2152876294 Website diguaym.com

Four categories of NoSQL databases
(1) Key-Value storage database

This One type of database mainly uses a hash table, in which there is a specific key and a pointer to specific data. The advantage of the Key/value model for IT systems lies in its simplicity and ease of deployment. However, if the DBA only queries or updates part of the value, the key/value becomes inefficient. For example: Tokyo Cabinet/Tyrant, Redis, Voldemort, Oracle BDB.

Typical application scenarios: content caching, mainly used for processing large amounts of data with high access load, and also used in some logging systems and so on.

Data model: Key points to the key-value pairs of Value, usually implemented by hash table

Pros and cons: fast search; data is unstructured, and is usually only treated as a string Or binary data

(2) Column storage database.

This part of the database is usually used to deal with the massive data of distributed storage. The keys still exist, but their characteristic is that they point to multiple columns. These columns are arranged by the column family. Such as: Cassandra, HBase, Riak.

Typical application scenario: Distributed file system

Data model: Column cluster storage, storing the same column data together

Pros and cons: fast search speed, strong scalability, and easier distributed expansion; relatively limited functions

(3) document database

Inspiration for document database It comes from Lotus Notes office software, and it is similar to the first key-value store. This type of data model is a versioned document, and semi-structured documents are stored in a specific format, such as JSON. The document database can be regarded as an upgraded version of the key-value database, allowing nesting of key-values ​​between them. Moreover, the query efficiency of a document database is higher than that of a key-value database. Such as: CouchDB, MongoDb. There is also a document database SequoiaDB in China, which has been open sourced.

Typical application scenario: Web application (similar to Key-Value, Value is structured, the difference is that the database can understand the content of Value)

Data model: Key-Value correspondence The key-value pair, Value is structured data

Advantages and disadvantages: the data structure requirements are not strict, the table structure is variable, there is no need to pre-define the table structure like a relational database; the query performance is not high, and Lack of a unified query syntax.

(4) Graph database

The graph structure database is different from other ranks and rigid structure SQL databases. It uses a flexible graph model and can be extended to many Servers. NoSQL database does not have a standard query language (SQL), so database queries need to develop a data model. Many NoSQL databases have REST-style data interfaces or query APIs. Such as: Neo4J, InfoGrid, Infinite Graph.

Typical application scenarios: social networks, recommendation systems, etc. Focus on building relational graphs

Data model: graph structure

Pros and cons: use graph structure related algorithms. For example, the shortest path addressing, N-degree relationship search, etc.; in many cases, the entire graph needs to be calculated to obtain the required information, and this structure is not good for a distributed cluster solution.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 675 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.