What is the structure of most database management systems currently used?
Most of the structures of database management systems are "relational structures". The relationship structure is an unformatted structure that uses a single two-dimensional table structure to represent entities and the relationships between entities. The relational structure organizes data in the form of record groups or data tables to facilitate storage and transformation using the relationships between various entities and attributes. It does not have hierarchies or pointers. It is a way to establish the relationship between spatial data and attribute data. Very efficient way to organize data.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
Most of the structures of database management systems currently used are "relational structures".
Relationship structure, also known as "relationship model", refers to a data model that expresses entities and relationships between entities in the form of a two-dimensional table.
Three basic data models have been produced in the data development process, which are hierarchical model, network model and relational model. These three models are named according to their data structures. The first two use formatted structures. In this type of structure, entities are represented by records, and records are abstracted as vertices of the graph. The connection between record types is abstracted as the connection arc between vertices. The entire data structure corresponds to the graph. The basic structure of the hierarchical model is a tree structure; the basic structure of the network model is an undirected graph without any restrictions. The relational model is an unformatted structure that uses a single two-dimensional table structure to represent entities and the relationships between entities. The relational model is a commonly used data model in current databases.
Relationship model: Organize data in the form of record groups or data tables to facilitate storage and transformation using the relationships between various entities and attributes. There is no hierarchy or pointers. It is a very effective data organization method to establish the relationship between spatial data and attribute data.
There are thirteen basic concepts and basic terms of the relational model. They are:
(1) Relationship: A relationship corresponds to a two-dimensional Table, two-dimensional table is the name of the relationship.
(2) Tuple: A row in a two-dimensional table is called a tuple.
(3) Attribute: Columns in a two-dimensional table are called attributes. The number of attributes is called the element or degree of the relationship. The value of the column is called the attribute value;
(4) (Value) Domain (Domain): The value range of the attribute value is the value domain.
(5) Component: The attribute value of the column corresponding to each row, that is, an attribute value in the tuple. [2]
(6) Relational schema: The row definition in the two-dimensional table, that is, the description of the relationship is called the relational schema. It is generally expressed as (attribute 1, attribute 2,..., attribute n). For example, the relationship model of a teacher can be expressed as a teacher (teacher number, name, gender, age, professional title, department).
(7) Key (code): If there is an attribute or set of attributes that uniquely identifies an entity in a relationship, it is called the key of the entity, that is, two keys in any relationship state of the relationship A tuple in which all combinations of values on this attribute are different.
(8) Candidate key (candidate code): If the value of a certain attribute in the relationship can uniquely identify a tuple, if no attribute can be removed in a key of the relationship, otherwise it is not this The key of a relationship is called the specified candidate key as the candidate key or candidate code of the relationship.
For example, in the following student table, "student number" or "library card number" can uniquely identify a tuple, then "student number" and "library card number" can both uniquely identify a tuple, then Both "student number" and "library card number" can be used as candidate keys for student relationships.
Student number |
Name |
Gender |
Age |
Library card number |
Department |
S3001 |
Zhang Ming |
Male |
##22 |
B20050101 | foreign language |
李京 | 女 | 21 | B20050102 | foreign language | |
Zhao Li |
|
21 | B20050301 | Management |
In the course selection table, only the attribute group "student number" and "course number" can uniquely identify a tuple, then the candidate key is (student number, course Number).
Student ID |
Course ID |
S3001 |
C1 |
##S3001 | C2 |
S3002 | C1 |
S4001 | C3 |
Three types of integrity rules for relational models
1. Entity integrity rulesThis rule requires that the tuples in the relationship must be There cannot be a null value on the attribute. If there is a null value, the primary key value cannot uniquely identify the tuple. 2. Referential integrity rulesIf the attribute set K is the primary key of the relationship schema R1, and K is also the foreign key of the relationship schema R2, then in the relationship R2, the value of K is only Two possibilities are allowed, either a null value, or equal to a primary key value in the R1 relationship.- When using, please note: a. The foreign key and the corresponding primary key can have different names, as long as they are defined in the same value range. b.R1 and R2 can also be the same relationship model, which represents the connection between attributes. c. Whether the foreign key value is allowed to be empty should depend on the specific problem.
Advantages of the relational model
(1) Single data structureIn the relational model, whether it is an entity or a connection between entities, Represented by relationships, each relationship corresponds to a two-dimensional data table, and the data structure is simple and clear. (2) The relationship is standardized and established on a strict theoretical basis. The basic norms that constitute the relationship require that each attribute in the relationship cannot be divided, and the relationship is established on a solid theoretical basis. based on strict mathematical concepts. (3) Simple concept and easy operationThe biggest advantage of the relational model is its simplicity, which is easy for users to understand and master. A relationship is a two-dimensional table, and users only need to use simple query language. Able to operate the database. For more related knowledge, please visit theFAQ column!
The above is the detailed content of What is the structure of most database management systems currently used?. 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

AI Hentai Generator
Generate AI Hentai for free.

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.

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.

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

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.

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.

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())

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

Using the database callback function in Golang can achieve: executing custom code after the specified database operation is completed. Add custom behavior through separate functions without writing additional code. Callback functions are available for insert, update, delete, and query operations. You must use the sql.Exec, sql.QueryRow, or sql.Query function to use the callback function.