Page 50 - Database-En-V3
P. 50

Then the primary key of the table is determined:

                   • Primary key:
                   It is a table field in which data is not allowed to be duplicated and
                   is used to distinguish table records. It is used to link tables logically
                   and can be searched through to obtain valid results within the
                   table
           Key column specifications:

       The primary key is the field that distinguishes records from other records. It consists of only one field
                                                                                    and is characterized by the following:

        • No two values in a primary key field are the same.
        • None of its values must be null.
        • Preferably a number

       Example: In a table containing student data, the most appropriate
       primary key for the table is “university number,” as it is: Contains values
       that cannot be repeated.

           No two students at the university have the same university number or                                                          Phone
           the same student code.                                                                                                        number

University ID the name Specialization the level reward Regularity date of birth the address

12321  Cairo  1/3/2010   yes  1000 1  mathematics Manal                                                                                  433001
12414  Cairo                  1000 2
12414  Cairo                  1000 1           Mohammed

              2/11/2009  yes          Physics  Maha                                                                                      433002
                                               Ahmad

              4/5/2010   yes          Mathematics Names                                                                                  433003
                                                         Khaled

43 Training unit in the field of technological information - at the Supreme Council of Universities © Intellectual property rights 2024
   45   46   47   48   49   50   51   52   53   54   55