关系数据库: 基本术语

Relational Databases: Basic Terms
关系数据库: 基本术语
The relational database model uses certain terms to describe its components:
关系数据库模型使用某些术语来描述其组件:
Data are the values kept in the database. On their own, the data means very little. CA 684-213 is an example of data in a DMV (Division of Motor Vehicles) database.
● 数据是保存在数据库中的值。就他们自己而言,数据意义很小。CA 684-213是DMV (机动车部门) 数据库中的数据示例。
Information is processed data. For example, CA 684-213 is the car registration number of a car belonging to Lyndon Manson, in a DMV database.
● 信息是处理数据。例如,在DMV数据库中,CA 684-213是属于Lyndon Manson的汽车注册号。
A database is a collection of tables, also called entities.
● 数据库是表的集合,也称为实体。
Each table is made up of records (the horizontal rows in the table, also called tuples). Each record should be unique, and can be stored in any order in the table.
● 每个表由记录 (表中的水平行,也称为元组) 组成。每个记录应该是唯一的,并且可以以任何顺序存储在表中。
Each record is made up of fields (which are the vertical columns of the table, also called attributes). Basically, a record is one fact (for example, one customer or one sale).
● 每个记录由字段 (即表的垂直列,也称为属性) 组成。基本上,记录是一个事实 (例如,一个客户或一次销售)。
These fields can be of various types. MariaDB has many types (see Data Types for a list), but generally types fall into three kinds: character, numeric, and date. For example, a customer name is a character field, a customer's birthday is a date field, and a customer's number of children is a numeric field.
● 这些字段可以是各种类型。MariaDB有许多类型 (请参阅列表中的数据类型),但类型通常分为三种: 字符、数字和日期。例如,客户名称是字符字段,客户的生日是日期字段,客户的孩子数量是数字字段。
The range of allowed values for a field is called the domain (also called a field specification). For example, a credit card field may be limited to only the values Mastercard, Visa and Amex.
● 字段的允许值范围称为域 (也称为字段规范)。例如,信用卡字段可能仅限于万事达卡、维萨卡和美国运通的值。
A field is said to contain a null value when it contains nothing at all. Null fields can create complexities in calculations and have consequences for data accuracy. For this reason, many fields are specifically set not to contain null values.
● 当字段不包含任何内容时,它被称为包含null值。空字段会在计算中产生复杂性,并对数据准确性产生影响。因此,许多字段被专门设置为不包含null值。
A key accesses specific records in a table.
● 键访问表中的特定记录。
An index is a mechanism to improve the performance of a database. Indexes are often confused with keys. Indexes are, strictly speaking, part of the physical structure, and keys are part of the logical structure. You'll often see the terms used interchangeably, however, including throughout this Knowledge Base.
● 索引是一种提高数据库性能的机制。索引经常与键混淆。严格来说,索引是物理结构的一部分,而键是逻辑的一部分。然而,你会经常看到这些术语可以互换使用,包括在整个知识库中。
A view is a virtual table made up of a subset of the actual tables.
● 视图是由实际表的子集组成的虚拟表。
A one-to-one (1:1) relationship is where for each instance of the first table in a relationship, only one instance of the second table exists, An example of this would be a case where a chain of stores carries a vending machine. Each vending machine can only be in one store, and each store carries only one vending machine.
● 一对一 (1:1) 关系是,对于关系中第一个表的每个实例,仅存在第二个表的一个实例,这方面的一个例子是连锁商店携带自动售货机。每个自动售货机只能在一个商店中,并且每个商店仅携带一台自动售货机。

image

A one-to-many (1:N) relationship is where for each instance of the first table in a relationship, many instances of the second table exist. This is a common kind of relationship. An example is the relationship between a sculptor and their sculptures. Each sculptor may have created many sculptures, but each sculpture has been created by only one sculptor.
● 一对多 (1:N) 关系是指对于关系中的第一个表的每个实例,存在第二个表的许多实例。这是一种常见的关系。一个例子是雕塑家和他们的雕塑之间的关系。每个雕塑家可能创作了许多雕塑,但每个雕塑仅由一位雕塑家创作。

image

A many-to-many (M:N) relationship occurs where, for each instance of the first table, there are many instances of the second table, and for each instance of the second table, there are many instances of the first. For example, a student can have many lecturers, and a lecturer can have many students.
● 发生多对多 (M:N) 关系,其中对于第一个表的每个实例,都有第二个表的许多实例,对于第二个表的每个实例,都有许多第一个表的实例。例如,一个学生可以有许多讲师,而一个讲师可以有许多学生。

A mandatory relationship exists where for each instance of the first table in a relationship, one or more instances of the second must exist. For example, for a music group to exist, there must exist at least one musician in that group.
● 存在强制关系,其中对于关系中第一个表的每个实例,必须存在第二个表的一个或多个实例。例如,要使一个音乐团体存在,该团体中必须至少存在一名音乐家。
An optional relationship is where for each instance of the first table in a relationship, there may exist instances of the second. For example, if an author can be listed in the database without having written a book (in other words, a prospective author), that relationship is optional. The reverse isn't necessarily true though. For example, for a book to be listed, it must have an author.
● 可选关系是,对于关系中第一个表的每个实例,可能存在第二个表的实例。例如,如果一个作者可以在没有写书的情况下被列在数据库中 (换句话说,是一个未来的作者),这种关系是可选的。然而,相反的情况不一定是真的。例如,要列出一本书,它必须有一个作者。
Data integrity refers to the condition where data is accurate, valid, and consistent. An example of poor integrity would be if a customer telephone number is stored differently in two different locations. Another is where a course record contains a reference to a lecturer who is no longer present at the school. Database normalization is a technique that assists you to minimize the risk of these sorts of problems.
● 数据完整性是指数据准确、有效和一致的条件。完整性差的一个例子是,如果客户电话号码在两个不同的位置以不同的方式存储。另一个是课程记录包含对不在学校的讲师的引用。数据库规范化是一种帮助您将此类问题的风险降至最低的技术。

你可能感兴趣的:(关系数据库: 基本术语)