Some basic definitions of the database

1. Domain : a set of values ​​with the same data type

2. Cartesian product :
Given a set of domains D1, D2, D3,...Dn, allowing some of the domains to be the same, the Cartesian product of D1, D2, D3,... Dn is:
D1 D2 D3*... …Dn = {(d1,d2,……,dn) | di belongs to Di, i = 1, 2, 3……, n}
where each element (d1, d2,……, dn) is called an n-tuple (Tuple for short) , each value di in the element is called a component .
The number of different values ​​allowed in a domain is the base of the domain .

3. Relations : D1 D2 D3*...... The subset of Dn is called the relationship on the domain D1, D2, D3,...... Dn, expressed as R (D1, D2, D3,...... Dn)
where R represents the name of the relationship , N is the order or degree of the relationship .
When n = 1, this relationship is called cell relationship , or one yuan relation
n = 2, this relationship is called binary relationships

4. Candidate code :
The value of a certain attribute group can uniquely identify a tuple, but its subset cannot be called a candidate code.
If there are multiple candidate codes for a relationship, select one as the main code .
The attributes of the candidate code are called main attributes. Attribute is not included in any candidate code is referred to as non-primary property or non-property codes

5. Full code : In the most extreme case, all attributes of the relational pattern are candidate codes for this relational pattern, called the full code.

6. Three types of relationships: basic relationships (also called basic tables or base tables), query tables and view tables.

7. The six properties of the basic relationship : 1. The columns are the same, that is, the components in each column share the same data type and come from the same domain.
2. Different columns can come from the same domain
. 3. The order of the columns is irrelevant
. 4. The candidate codes of any two tuples cannot take the same value.
5. The order of the rows does not matter
. 6. The components must take atomic values, that is, each component is indivisible data item. (The most basic one )

Guess you like

Origin blog.csdn.net/weixin_43244265/article/details/105800938