AITC Wiki

NoSQL Database

非关系型数据库

NoSQL Database

中文版:非关系型数据库

A non-relational database designed to store and retrieve semi-structured and unstructured data.

Definition

  • NoSQL database is unstructured data.
  • It was designed to overcome big data’s scalability and performance issues, which traditional databases were not designed to address.
  • It is specifically used when organizations need to access, process, and analyze a large volume of unstructured data.

Four Main Types

TypeDescriptionExamples
Key-Value StoreSimplest NoSQL model; data split into key and valueAmazon DynamoDB, Riak, Redis, Berkeley DB, Memcached, Hamster DB
Column-StoreStores data as columns instead of rowsHBase, Cassandra
Document DatabaseStores flexible documents in field-value pairs (JSON, XML)MongoDB, CouchDB, Microsoft DocumentDB
Graph DatabaseRepresents data as nodes, edges, and propertiesNeo4J, InfiniteGraph, HypherGraphDB, AllegroGraph, GraphBase, OrientDB

Key-Value Store

  • Key-value databases are the simplest of the NoSQL databases.
  • The data is usually split into two parts: key and value.
  • The key is a string, and the value is the actual data; hence the reference key-value pair.

Column-Store Database

  • A column-oriented database stores the data as columns instead of storing them as rows.
  • The working method is that it saves data into sections of columns rather than sections of rows.
  • Based on data retrieval needs, data can be stored as row-oriented (OLTP) or column-oriented (OLAP).
  • The key difference is the way the data are physically stored on disk:
    • Row-oriented databases store the whole row in the same block, if possible.
    • Columnar databases store columns in subsequent blocks.

Document Database

  • A document is a record in a document database.
  • Instead of storing data in fixed rows and columns, document databases use flexible documents.
  • Documents store data in field-value pairs.
  • The values can be a variety of types and structures, including strings, numbers, dates, arrays, or objects.
  • Documents can be stored in formats like JSON or XML.
  • A group of documents is called collections.
  • Collections typically store documents that have similar contents.

Graph Database

  • The graph is a pictorial representation of data in the form of nodes and relationships which are represented by edges.
  • It has three components: nodes, relationships, and properties.
  • Nodes: represent the objects or instances; equivalent to a row in database; act as a vertex in a graph.
  • Relationships: represent the edges; have a specific direction, type and form patterns of the data.
  • Properties: information associated with the nodes.

Sources