Every table in database must have some keys that have their respective roles. In this time, I will discuss about the Key and Descriptive Attributes on the Data Modelling.

Key is one or a combination of several attributes used to distinguish each row of data that exist in a database (row). If an attribute used as a key, then there should be no other attributes are used as a key with the same value.

There are three kinds of keys are distinguished on a Data Modelling, namely: superkey, Candidate Key and Primary Key.

1. Superkey is one or more attributes that can distinguish each data row (row) in the table uniquely. On a table there could be a set of superkey. Example: Students

                 - (Nim, nama_mahasiswa, alamat_mhs, tgl_lahir)

                 - (Nim, nama_mhs, alamat_mhs)

                 - (Nim, nama_mhs)

                 - (Nama_mhs), if we can guarantee you the same No u / attribute this

                 - (Nim)

2. Candidate-Key is a minimal set of attributes that can distinguish each data row (row) in a table uniquely. In the student table is:

                 - (Nim)

                 - (Nama_mhs), if we can assure you there is no equal value for this column.

3. Primary Key is an attribute which is used as the identity or lock on a table. Primary Key on a table there is only 1. If the primary key of table A are on the table B, then the primary key is called a Foreign Key.

That was a brief explanation of Key and Descriptive Attributes (Data Modelling). If there are errors or omissions please justified or added. May be useful ..

0 komentar

Related Posts Plugin for WordPress, Blogger...