MySQL 管理系统

创建于 2024-12-02 / 30
字体: [默认] [大] [更大]

什么是 RDBMS?

RDBMS 代表关系数据库管理系统。

RDBMS 是一个用于维护关系数据库的程序。

RDBMS 是所有现代数据库系统的基础,例如 MySQL、Microsoft SQL Server、Oracle 和 Microsoft Access。

RDBMS 使用 SQL 查询 来访问数据库中的数据。


什么是数据库表?

表是相关数据条目的集合,由列和行组成。

一列包含有关表中每条记录的特定信息。

记录(或行)是表中存在的每个单独条目。

查看罗斯文"客户"表中的选择:

CustomerID CustomerName ContactName Address City PostalCode Country
1

Alfreds Futterkiste Maria Anders Obere Str. 57 Berlin 12209 Germany
2 Ana Trujillo Emparedados y helados Ana Trujillo Avda. de la Constitución 2222 México D.F. 05021 Mexico
3 Antonio Moreno Taquería Antonio Moreno Mataderos 2312 México D.F. 05023 Mexico
4

Around the Horn Thomas Hardy 120 Hanover Sq. London WA1 1DP UK
5 Berglunds snabbköp Christina Berglund Berguvsvägen 8 Luleå S-958 22 Sweden

上面"Customers"表中的列是: CustomerID, CustomerName, ContactName, Address, City, PostalCode 和 Country。 该表有 5 条记录(行)。


Advertisement

-->

什么是关系数据库?

关系数据库以表的形式定义数据库关系。 这些表相互关联 - 基于每个表的共同数据。

查看 Northwind 数据库中的以下三个表"Customers"、"Orders"和"Shippers":

Customers 表

CustomerID CustomerName ContactName Address City PostalCode Country
1

Alfreds Futterkiste Maria Anders Obere Str. 57 Berlin 12209 Germany
2 Ana Trujillo Emparedados y helados Ana Trujillo Avda. de la Constitución 2222 México D.F. 05021 Mexico
3 Antonio Moreno Taquería Antonio Moreno Mataderos 2312 México D.F. 05023 Mexico
4

Around the Horn Thomas Hardy 120 Hanover Sq. London WA1 1DP UK
5 Berglunds snabbköp Christina Berglund Berguvsvägen 8 Luleå S-958 22 Sweden

"Customers"表和"Orders"表的关系是CustomerID列:

Orders 表

OrderID CustomerID EmployeeID OrderDate ShipperID
10278

5 8 1996-08-12 2
10280 5 2 1996-08-14 1
10308 2 7 1996-09-18 3
10355

4 6 1996-11-15 1
10365 3 3 1996-11-27 2
10383 4 8 1996-12-16 3
10384 5 3 1996-12-16 3

"Orders"表和"Shippers"表的关系是ShipperID列:

Shippers 表

ShipperID ShipperName Phone
1 Speedy Express (503) 555-9831
2 United Package (503) 555-3199
3 Federal Shipping (503) 555-9931


0 人点赞过