Generalities
Definition :
The schema of a database is defined by :
The set of relationship schemas that make up the database,
The database schema shows how data is organized in the database.
Key to a relationship
One of the integrity constraints of a schema is the unique identification of the tuples of a relation. This unique identification is ensured by the notion of relationship key.
A key can be made up of a single attribute or a list of attributes that uniquely characterizes a tuple of the relationship.
A relationship can have several keys. A key with a minimum number of attributes is chosen as the primary key; other possible keys are called candidate keys.
By convention, the primary key of a relationship is underlined in a relationship diagram.
Primary key: One or more attributes of a relationship, enabling its tuples (records) to be fully differentiated.
In other words, a primary key is one or more attributes that uniquely identify records.
Candidate key: One or more attributes that can be qualified as a unique key in a relationship.