数据库

概述

参考:

  • DB-Engines(所有数据库的排名、状态等信息的观察网站)

数据库是由特定软件(所谓的数据库管理系统(简称 DBMS))管理的数据的逻辑集合。数据库和 DBMS 共同构成数据库系统。

A database is a logical collection of data which is managed by a specific software (the so-called database management system or DBMS). Database and DBMS together form the database system.

数据库不仅包括用户数据,还包括对其进行管理所需的对象(例如索引或日志文件)。

A database includes not only user data but also the objects necessary for its management (e.g. indexes or logfiles).

数据库的类型

  1. RDBMS:关系型数据库
    1. Oracle
    2. MariaDB/MySQL
  2. NoSQL:非关系型数据库
    1. Key/Val NoSQL:redis,etcd
    2. Column Family NoSQL 列族:HBase
    3. Documentation NoSQL:MongoDB
    4. Graph  NoSQL:Neo4j
  3. NewSQL:分布式数据库

Relational DBMS

详见 关系数据

Relational database management systems(关系数据库管理系统,简称 RDBMS) support the relational (=table-oriented) data model. The schema of a table (=relation schema) is defined by the table name and a fixed number of attributes with fixed data types. A record (=entity) corresponds to a row in the table and consists of the values of each attribute. A relation thus consists of a set of uniform records.

The table schemas are generated by normalization in the process of data modeling.

Certain basic operations are defined on the relations:

  • classical set operations (union, intersection and difference)
  • Selection (selection of a subset of records according to certain filter criteria for the attribute values)
  • Projection (selecting a subset of attributes / columns of the table)
  • Join: special conjunction of multiple tables as a combination of the Cartesian product with selection and projection.

These basic operations, as well as operations for creation, modification and deletion of table schemas, operations for controlling transactions and user management are performed by means of database languages, with SQL being a well established standard for such languages.

The first relational database management systems appeared on the market at the beginning of the 1980s and since have been the most commonly used DBMS type.

Over the years, many RDBMS have been expanded with non-relational concepts such as user-defined data types, not atomic attributes, inheritance and hierarchies, which is why they are sometimes referred to as object-relational DBMS.

Find more systems in our relational DBMS ranking.

NoSQL

NoSQL Database Systems are an alternative to the mainstream Relational DBMS. They don’t use a relational data model and typically have no SQL interface.

Although this type of systems exists for many years (some even longer than relational systems), the term NoSQL was first introduced in 2009 when many new systems were developed in order to cope with the new requirements for database management systems at that time. E.g.  Big Data, scalability and fault tolerance for large web applications.

The acronym NoSQL is often understood as “Not Only SQL”, implying that relational systems are a proven technology but not necessarily the optimal choice for each kind of intended use.

NoSQL 随着发展也出现了一种新的概念,称为 Schemaless,在 RedisMongoDB、etc. 的官网文章中都有提到 Schemaless Database。

Classification(分类)

NoSQL systems are a heterogenous group of very different database systems. Therefore each attempt for a classification fails in classifying one or another system. However, the following categegories are well accepted:

Advantages(优势)

Not all of the above mentioned classes have the same general advantages, but they benefit from a combination of the following aspects.

  • higher performance
  • easy distribution of data on different nodes (e.g. sharding), thereby achieving scalability and fault tolerance
  • higher flexibility by using a schema-free data model.
  • simpler administration

Methods

These advantages are achieved by means of one or more of the following approaches:

  • No normalized relational data model
  • Abandoning one or more of the ACID criteria
  • Less powerful possibilities for querying the data

学习资料

公众号,数据库即架构