Home Common Problem What is the structure of most database management systems currently used?

What is the structure of most database management systems currently used?

Aug 24, 2022 pm 02:15 PM
database database management system Database systems Database structure

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.

What is the structure of most database management systems currently used?

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.

##S3002李京女21B20050102foreign language##S4001
Student number
Name
Gender
Age
Library card number
Department
S3001
Zhang Ming
Male
##22
B20050101
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
(8) Primary key (primary key): Specify a user among several candidate keys of a relationship To uniquely identify the tuple of the relationship, the specified candidate key is called the primary key, or simply the primary key, keyword, or primary key. Each relationship has one and only one primary key, usually a smaller combination of attributes is used as the primary key. For example, in the student table, if "student number" is selected as the basis for data operation, then "student number" is the primary key. In the course selection table, the primary key is (student number, course number).

(9) Primary attributes and non-primary attributes: The attributes included in any candidate key in the relationship are called primary attributes, and the attributes not included in any candidate key are non-primary attributes.

(10) Full key or full code: a collection of all attributes in a relational schema.

(11) Foreign key or foreign key: Although an attribute in a relationship is not the primary key of this relationship, or is only the primary key, but it is the primary key of another relationship, it is called a foreign key. Or foreign code.

(12) Super key or super code: If an attribute is removed from a key of a relationship and it is still the key of the relationship, such a key is called a super key or super code of the relationship.

(13) Reference relationship and referenced relationship: refers to two relationships that are related to each other by foreign keys and can be transformed into each other.

Three types of integrity rules for relational models

1. Entity integrity rules

This 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 rules

If 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.

3. User-defined integrity rules

This is a constraint for specific data, determined by the application environment.

Advantages of the relational model

(1) Single data structure

In 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 operation

The 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 the

FAQ 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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How does Go language implement the addition, deletion, modification and query operations of the database? How does Go language implement the addition, deletion, modification and query operations of the database? Mar 27, 2024 pm 09:39 PM

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.

How does Hibernate implement polymorphic mapping? How does Hibernate implement polymorphic mapping? Apr 17, 2024 pm 12:09 PM

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.

iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos Jul 18, 2024 am 05:48 AM

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

An in-depth analysis of how HTML reads the database An in-depth analysis of how HTML reads the database Apr 09, 2024 pm 12:36 PM

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.

How to handle database connection errors in PHP How to handle database connection errors in PHP Jun 05, 2024 pm 02:16 PM

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.

Detailed tutorial on establishing a database connection using MySQLi in PHP Detailed tutorial on establishing a database connection using MySQLi in PHP Jun 04, 2024 pm 01:42 PM

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

Tips and practices for handling Chinese garbled characters in databases with PHP Tips and practices for handling Chinese garbled characters in databases with PHP Mar 27, 2024 pm 05:21 PM

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

How to use database callback functions in Golang? How to use database callback functions in Golang? Jun 03, 2024 pm 02:20 PM

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.