Page 473 - Computer_Science_F5
P. 473

Computer Science  Table 8.16: Employee address  emp_city   emp_district
            emp_pc
                              emp_reg
                              AR
                                              Arusha
                                                                  Arumeru
            282005
                                                                  Kinondoni
            222008
                                              DSM
                              DS
          FOR ONLINE READING ONLY
            282007
                              TG
                                                                  Muheza
            292008            DS              DSM                 Temeke
                                              Tanga
            222999            MZ              Mwanza              Ilemela
                 Activity 8.7:
             Normalising databases up to the 3rd Normal form

            Aim:
            The aim of this activity is to understand and apply the principles of database
            normalization up to the Third Normal Form (3NF).


            Materials:
            Computer with database management system (DBMS) software (such as, MySQL,
            PostgreSQL);
            Access to Employee details.


            Instructions:
            Study Table 8.17 and then answer the questions that follow:

            Table 8.17: Employee details before normalization

             Staff No  Branch No Branch address        Name            Position  Hr/week
             S3244    B0021      Temeke, Plt 12G DSM Asha Haji         Assistant 16
             S3244    B0045       Mikocheni, Plt 32A,  Asha Haji       Assistant 9
                                  DSM
             4545     B0021       Temeke, Plt 12G DSM Mayalla Macho Assistant 14
             S4545    B0045       Mikocheni, Plt 32A,  Mayalla Macho Assistant 10
                                   DSM

            Questions:
             1.  Why is this table not in 3NF? Give two reasons.

             2.  Describe and illustrate the process of normalizing the data shown in Table 8.17
                to the Third Normal form (3NF).

             3.  Identify the primary, alternate, and foreign keys in your 3NF relations.


                                                 464
                                                                for Advanced Secondary Schools



     Computer Science Form 5.indd   464                                                     23/07/2024   12:34
   468   469   470   471   472   473   474   475   476   477   478