Home >Common Problem >What are the three types of databases?
Database types can be divided into hierarchical, network and relational types. A hierarchical database presents data according to a hierarchical structure (tree structure); a network database is a database that uses network principles and methods and is based on a network data model; a relational database uses a relational model to A database that organizes data.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
What are the database types?
There were three popular database types in the early days, namely hierarchical database, network database and relational database. In today's Internet, there are two main types of databases, namely relational databases and non-relational databases.
Introduction to hierarchical database
Hierarchical database is the first developed database system software. It presents data in a hierarchical structure (tree structure). Hierarchical databases used to be very popular databases, but with the increasing popularity of relational databases, they are now rarely used.
Features: The nature of the tree determines the characteristics of the tree data model
1. There is and is only one node in the entire model that has no parent node, and the remaining nodes must have and have only one parent. Node, but all nodes do not need to have child nodes;
2. All child nodes cannot exist independently from the parent node. That is to say, if you want to delete the parent node, then all child nodes under the parent node All must be deleted at the same time, but some leaf nodes can be deleted individually;
3. Each record type has and has only one path from the parent node to itself;
is more symbolic The hierarchical database is an IMS (Information Management System) database, developed by IBM.
Introduction to network database
Definition: A data structure model that uses a directed graph to represent entities and the relationship between entities is called a network data model.
Features:
1. Two or more nodes can exist without parent nodes;
2. A single node is allowed to have more than one parent node;
Detailed introduction to relational database
Network databases and hierarchical databases lack data independence and abstraction levels. When users store data, they need to declare the storage structure and relative path. The relational database can solve this problem more effectively.
Relational database refers to a database that uses a relational model to organize data. It stores data in the form of rows and columns to facilitate user understanding. The series of rows and columns in a relational database are called Table, a group of tables makes up a database. Users retrieve data from a database through queries, which are executable codes that limit certain areas of the database. The relational model can be simply understood as a two-dimensional table model, and a relational database is a data organization composed of two-dimensional tables and the relationships between them.
Like Excel workbooks, relational databases also use two-dimensional tables composed of columns and rows to manage data, which is simple and easy to understand. In addition, it also uses SQL (Structured Query Language, structured query language) to carry out actual operations on data.
Detailed introduction to non-relational databases
With the rise of Internet technology Web2.0, traditional relational databases are facing large amounts of data, such as large scale and high concurrency. When it comes to Weibo, WeChat or SNS-type web2.0 dynamic web pages, it has become somewhat inadequate and exposed many insurmountable problems. Therefore, a database product - NOSQL database - has emerged for large-scale data volume scenarios, aiming at excellent performance and convenient application.
Non-relational database is mainly based on the "non-relational entity model" database, also called NoSQL database. The original meaning of NOSQL is "Not only SQL", not the meaning of "NoSQL". Therefore, NoSQL The emergence of database is not to completely deny the relational database, but as a reasonable supplement to the traditional relational database. NOSQL database can give full play to unimaginable high efficiency and excellent performance under special circumstances.
Non-relational databases can also be broken down into four sub-items:
Key-Value storage database;
Column-oriedted database;
Document-Oriented database;
Graphic (Graph) database.
Differences in application fields of different types of databases
From the perspective of database application, databases can also be divided into operation-oriented and data analysis-oriented. Type, the following is a brief introduction to the database based on different actual application scenarios.
1. Operation-oriented relational database
Typical application areas: ERP, CRM, credit card transactions, small and medium-sized e-commerce
Data storage method: table
Popular vendors: Oracle Database, Microsoft SQLServer, IBM DB2, EnterpriseDB (PostgreSQL), MySQL
Advantages: Complete ecological environment protection, transaction guarantee/data consistency
Disadvantages: strict data model definition, database expansion restrictions, and difficult to combine with non-structured applications.
2. Relational database for data analysis
Typical application areas: data warehouse, business intelligence, data science research
Data storage method: table
Popular vendors: Oracle Exadata, Oracle Hyperion, Teradata, IBM Netezza, Google BigQuery
Advantages: Consistency of information content and calculations
Disadvantages: Must be maintained by IT staff with database expertise, data response is usually minute-level
3. Operation-oriented non-relational database
Typical application areas: Web, mobile, and IoT applications, social networking, user recommendations, shopping carts
Data storage methods: There are many storage structures (document, graph, column, key-value, time series)
Popular manufacturers: MongoDB, Amazon DynamoDB, Amazon,Redis
Advantages: Convenience, coordination ability (no predefined method), horizontal scalability (adapting to large-scale data volume), low cost (open source system)
Disadvantages: Lack of transaction guarantee
4. Non-relational database for data analysis
Typical applications Fields: Indexing millions of data points, predictive analytics, fraud detection
Data storage method: Hadoop does not use original data structures; data can be stored across multiple servers
Popular vendors: Cloudera, Hortonworks, MapR, MarkLogic, Snowflake, DataBricks, ElasticSearch
Advantages: Suitable for batch processing, parallel processing of files; mainly Open source, low capital investment
Disadvantages: slow response speed; not suitable for rapid retrieval or high-speed updates
Related recommendations: "programminglearning》
The above is the detailed content of What are the three types of databases?. For more information, please follow other related articles on the PHP Chinese website!