NoSQL data model (1) nosql

Source: Internet
Author: User
Tags riak

NoSQL data model (1) nosql
Background The previous blog has introduced the overall data model. The following describes the four data models in NoSQL. For example:
The concept key-value database is a simple hash table, which is mainly used when all database accesses are operated by the primary key. When discussing the features of each NoSQL database, you must understand its "consistency", "transactional", query features, data structure, and scalability. Consistency is not "consistent" only for single-key operations, because such operations can only be "get", "set", or "Delete ". The "optimistic writing" function can also be implemented. However, because the database cannot detect numeric changes, the implementation cost is too high. Riak is a Distributed Key-value database that uses the "final consistency model" to achieve consistency. Because the branches may have been copied to other nodes, there are two ways to solve the "Update conflict": one is to reject old data by adopting newly written data, the other is to return the two to the client to resolve the conflict. Different types of key-value database products for transactions have different "transaction" specifications. Generally, the "consistency" of write operations cannot be guaranteed ". Different databases have different ways to implement "transactions. Riak adopts the "arbitration" concept. when calling the Data Writing API, it uses W value and copy silver to implement "arbitration ". All key-value databases can be queried by keyword. Their query functions are basically limited to this. The data structure key-value database does not care about the values in the key-value pairs. It can be binary, text, JSON, XML, etc. When using Riak, you can use Content-Type to specify the Data Type in the post request. Extensibility many key-value databases use the "sharding" technology to expand. With this technology, the key name determines the node responsible for storing the key. When the number of nodes in the cluster increases, this "sharding" setting can improve efficiency. However, "sharding" may also cause some problems. Like Riak, you can quickly inform the parameters in "CAP Theorem": N (number of replica nodes for storing key-value pairs) and R (minimum number of nodes required for successful read Operations) and W (minimum number of nodes required for successful write operations) applicable cases: a set of scenarios where session information, user configuration information, shopping cart data are not used, data relationships, transactions containing multiple operations, query data, and Operation keywords.

Related Article

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.