Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

On the arrangement of knowledge of MySQL Relational Database

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the MySQL relational database, the content of the article is carefully selected and edited by the author, has a certain pertinence, and is of great significance to everyone's reference, so let's learn about the MySQL relational database with the author.

Relational database 1 definition

Relational database is a kind of database based on relational model (mathematical model).

As for the relational model, it is a so-called relationship-based model, which consists of three aspects:

Data structure: form of data storage, two-dimensional tables (rows and columns)

Set of operation instructions: all SQL statements

Integrity constraints: data constraints within the table (fields and fields) and constraints between tables (foreign keys).

2 Design

Database: analyzed from the data requirements that need to be stored, if it is a kind of data (entity), it should be designed as a two-dimensional table

Two-dimensional table: consists of the header (the field name, which is used to specify the name of the data) and the data (what is actually stored).

2D example:

IDEEROR_CODEDESCRIPTION1US0001 this user is not registered 2OR0001 order generation failed 3SY0001 system unknown exception

Here, if the corresponding field value in the table is empty, but the system still allocates storage space for it, which is why relational databases waste more space!

3 keyword description

DB:Database, database

DBMS:Database Management System, database management system

DBS:Database System = DBMS + DB, database system

DBA:Database Administrator, database administrator.

Row\ record: row\ record, essentially refers to a row in the table (a record), the row is from the structural point of view, the record is from the data point of view.

Column\ field: column\ field, essentially refers to a column (a field) in the table, the column is from the structure point of view, the field is from the data point of view.

4 SQL

SQL:Structured Query Language, structured query language (the data is mainly query, 99% of the data are query operations).

There are three main types of SQL:

DDL:Data Definition Language, a data definition language, is used to maintain the structure (database, table) in which data is stored. The representative instructions are create, drop, alter, etc.

DML:Data Manipulation Language, a data manipulation language, is used to operate on data (the contents of the table). The representative instructions are insert, delete and update, etc., but there is a separate classification within DML, namely DQL (Data Query Language), data query language, and the representative instruction is select.

DCL:Data Control Language, data control language, is mainly responsible for (user) rights management, representative instructions for grant and revoke and so on.

SQL is a relational database operation instruction, a constraint, but not mandatory, similar to the W3C, so this means that there may be some subtle differences within different database products, such as Oracle and MySQL.

After reading the above about MySQL relational database, many readers must have some understanding. If you need to get more industry knowledge and information, you can continue to follow our industry information column.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report