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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Go language is an efficient, concise and easy-to-learn programming language. It is favored by developers because of its advantages in concurrent programming and network programming. In actual development, database operations are an indispensable part. This article will introduce how to use Go language to implement database addition, deletion, modification and query operations. In Go language, we usually use third-party libraries to operate databases, such as commonly used sql packages, gorm, etc. Here we take the sql package as an example to introduce how to implement the addition, deletion, modification and query operations of the database. Assume we are using a MySQL database.

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

Hibernate polymorphic mapping can map inherited classes to the database and provides the following mapping types: joined-subclass: Create a separate table for the subclass, including all columns of the parent class. table-per-class: Create a separate table for subclasses, containing only subclass-specific columns. union-subclass: similar to joined-subclass, but the parent class table unions all subclass columns.

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

To handle database connection errors in PHP, you can use the following steps: Use mysqli_connect_errno() to obtain the error code. Use mysqli_connect_error() to get the error message. By capturing and logging these error messages, database connection issues can be easily identified and resolved, ensuring the smooth running of your application.

HTML cannot read the database directly, but it can be achieved through JavaScript and AJAX. The steps include establishing a database connection, sending a query, processing the response, and updating the page. This article provides a practical example of using JavaScript, AJAX and PHP to read data from a MySQL database, showing how to dynamically display query results in an HTML page. This example uses XMLHttpRequest to establish a database connection, send a query and process the response, thereby filling data into page elements and realizing the function of HTML reading the database.

PHP is a back-end programming language widely used in website development. It has powerful database operation functions and is often used to interact with databases such as MySQL. However, due to the complexity of Chinese character encoding, problems often arise when dealing with Chinese garbled characters in the database. This article will introduce the skills and practices of PHP in handling Chinese garbled characters in databases, including common causes of garbled characters, solutions and specific code examples. Common reasons for garbled characters are incorrect database character set settings: the correct character set needs to be selected when creating the database, such as utf8 or u

Through the Go standard library database/sql package, you can connect to remote databases such as MySQL, PostgreSQL or SQLite: create a connection string containing database connection information. Use the sql.Open() function to open a database connection. Perform database operations such as SQL queries and insert operations. Use defer to close the database connection to release resources.