Introduction to basic knowledge of relational database

              

 

1. Introduction to related terms of relationship

Attribute: Several characteristics that describe things are called attributes. Such as student ID, name, position, age, etc.

Domain: A collection of value ranges for attributes. For example, the gender is male, female, and the length of the student ID is 8 digits. Generally, in the relational data model, a restriction is added to the domain, and all domains are atomic data (Atomic Data).

For example, integers and strings are atomic data, and collections and arrays are non-atomic data. This restriction of the relational model is called the first normal form (1NF) condition.

Degree or degree (Degree): R represents the name of the relationship, and n is the degree or degree of the relationship.

Candidate Key: If the value of a certain attribute or attribute group in the relationship can uniquely identify a tuple, it is called the attribute or attribute group as a candidate code.

Primary Key: Primary key. If there are multiple candidate codes for a relationship, select one as the primary key.

Prime Attribute: The attribute that contains any candidate code is called the primary attribute, and the attribute that does not contain any candidate code is called the non-primary attribute.

Foreign Key: The attribute or attribute group in the relational pattern R is not the code of the relationship, but it is the code of other relations, then the attribute set is a foreign key for the relational pattern R, also called a foreign key.

All-key (ALL-key): All attribute groups of the relational model are candidate codes for this relational model, which are called full keys.

2. The type of relationship

Basic relationship: The actual table is the logical representation of the actual stored data.

Query table: the table corresponding to the query result.

View table: A table derived from a basic table or other view tables is not stored independently in the database. The database only stores definitions, so it is also called a virtual table.

IT technology sharing community

Personal blog site: https://programmerblog.xyz

The article recommends programmer efficiency: commonly used tools for drawing flowcharts. Programmer efficiency: organize commonly used online note-taking software. Remote office: commonly used remote assistance software, do you know? 51 MCU program download, ISP and serial port basic knowledge hardware: basic knowledge of circuit breaker, contactor, relay

Guess you like

Origin blog.csdn.net/xishining/article/details/109685018