카테고리 없음

Types of NoSQL databases

종우공간 2021. 9. 2. 02:40

No SQL databases do not have to be implemented as distributed systems. Many can run on a single server. However, some of the most interesting and appealing features of NoSQL databases require a distributed implementation. As you design your NoSQL databases and related applications, consider how you want to balance your need for scalability, availability, consistency, partition protection, and durability.

 

Here are four types of NoSQL databases:

 

1. Key-value pair databases

Key-value pair databases are the simplest form of NoSQL databases. These databases are modeled on two components: keys and values

The important principle to remember about keys is that they must be unique within a namespace. Because key-value databases allow virtually any data type in values, it is important for software developers to implement checks in their programs.

 

Differences between key-value and relational databases

Key-value databases are modeled on minimal principles for storing and retrieving data. Unlike in relational databases, there are no tables, so there are no features associated with tables, such as columns and constraints on columns. There is no need for joins in key-value databases, so there are no foreign keys. Key-value databases do not support a rich query language such as SQL.

Some key-value databases support buckets, or collections, for creating separate namespaces within a database. This can be used to implement something analogous to a relational schema.

 

2. Document databases

Document databases use a key-value approach to storing data but with important differences from key-value databases. A document database stores values as documents. Instead of stroring each attribute of an entity with a separate key, document databases store multiple attributes in a single document. Also, one of the most important characteristics of document databases is you do not have to define a fixed schema before you add data to the database. This gives more flexibility for developers because they can add attributes as needed.

 

Differences between document and relational databases

besides of not requiring fixed schema, another important difference is that documents can have embedded documents and lists of multiple values within a document. Embedding documents or lists of values in a document eliminates the need for joining documents the way you join tables in a relational database.

Document databases are probably the most popular type of NoSQL database. They offer support for querying structures with multiple attributes, like relational databases, but offer more flexibility with regard to variation in the attributes used by each document.

 

3. Column family store databases

 

4. Graph databases