Page 51 - Database-En-V3
P. 51
In the partition table we see that the primary key is the partition code
and is not repeated:
For example, we cannot set the field “Department Name” as a primary
key because it is possible to repeat data in it because names are always
repeated.
Types of keys
• The primary key
• Composite key
• Foreign key
• Alternative key
Types of keys
Alternative key Foreign key Composite Key: Primary Key:
Alternative key Foreign key It has the same The field that
It is a primary key in It is a primary properties as the
a table (such as the key in another primary key, but distinguishes a record
national number as a table that has from other records. It
non-duplicate the same data it consists of consists of only one
two or more
primary key) type field and is
It can be replaced The value can be fields characterized by the
repeated with it
with another following:
alternative field, *No two values in a
primary key field are
such as:
Student code the same
* None of the values
must be Null
- Preferably a number
44 Training unit in the field of technological information - at the Supreme Council of Universities © Intellectual property rights 2024