Relation; relational model; relational database

In order to better describe these three concepts, some concepts of the relational model must be explained.

Table Student
figure 1
In the terminology of the relational model, relations are used to refer to representatives , and tuples are used to refer to rows . Similarly, attributes refer to columns in the table .
There are five attributes in the Student table: Sno, Sname, Ssex, Sage and Sdept.
We use the term relationship instance to represent a specific instance of a relationship , that is, a specific set of rows contained. There are 5 tuples in the table Student instance, corresponding to 5 students.

The concept of relationship has been given above, let's discuss the relationship model below.

This is explained in the book "Database System Concepts" by Abraham Silberschatz et al.:
When we talk about databases, we must distinguish between database schema and database instance . The former is the logical design of the database, and the latter is the database at a given moment. A snapshot of the data.
The concept of relations corresponds to the concept of variables in programming languages, and the concept of relational patterns corresponds to the concept of types in programming.

This is explained in the "Database System Concept" by Professor Wang Shan:
The description of the relationship is called the relationship model.
Relations can be considered as the state or content of the relational pattern at a certain moment.

Therefore, it can be known that the relational pattern is a broader concept than the relation, describing the logical design of the entire database, and the relation is a snapshot of the relational pattern at a certain moment. The relationship is dynamic and constantly changing over time; the relationship model is static and stable.

relational database

The relational database is defined
in the "Database System Concept" written by Professor Wang Shan: In the relational model, entities and the connections between entities are described by relations. For example, the one-to-many relationship between tutor entity, graduate student entity, tutor and graduate student can be represented by a relationship. In a given application field, the collection of all relationships constitutes a relational database.
In the book "Database System Concepts" by Abraham Silberschatz et al., this is explained: a
relational database is composed of a collection of tables, and each table has The only name.
figure 1
The figure above is a relational database, where Course and Student are two tables (ie relations) contained in the database student.

Guess you like

Origin blog.csdn.net/qq_42392049/article/details/112971858
Recommended