Page 469 - Computer_Science_F5
P. 469

Computer Science  Lastly, there is a delete anomaly in this unnormalized table. If the company closes
           department  D890,  deleting rows with  emp_dept  as D890 would also  remove
           employee Madina’s information because she is only assigned to that department.

           To resolve these issues, it’s essential to normalize the data into the three normal
           forms introduced earlier. Another example of an Unnormarised Table is shown in
          FOR ONLINE READING ONLY
           Table 8.7.


            Table 8.7: Non-normalized table
            Full name         Address     Movie_industry              Sports
            Ismail Makame     Kijichi     Hollywood and Bollywood     Football and Basketball
            Rehema Kiongwe Mnazi Moja Swahiliwood and Nollywood Netball
            Muki Mohamed      Mbagala     Nollywood and Riverwood     Cricket



           Advantages of normalization               First Normal Form (1NF)
             (i)  Normalization helps to reduce data   As indicated in Figure 8.8, the objective
                 redundancy                          of  this  1NF is  to  remove  repeating
             (ii)  More incredible overall database   attributes.  This is done because the
                 organisation                        relation is in 1NF if it contains an atomic
             (iii) Data consistency within the       value, and an attribute of a table cannot
                 database                            hold multiple values. Instead must have
             (iv) Much  more  flexible  database
                 design                              only single-valued attributes.
             (v)  Enforces the concept of relational
                 integrity                           Also, 1NF disallows the multi-valued
                                                     attribute, composite attribute, and their
           Disadvantages of normalization
             (i)  You cannot start building the      combinations.  For a table to be in the
                 database before knowing what        First Normal Form, it should follow the
                 the user needs.                     following four rules:
             (ii)  The performance degrades when      (i)  It should only have single (atomic)
                 normalizing the relations to higher      valued attributes/columns.
                 normal forms, that is, 4NF, and      (ii)  Values stored in a column should
                 5NF.
             (iii) It is very time-consuming and          be of the same domain.
                 challenging to normalize relations   (iii) All the columns in a table should
                 of a higher degree.                      have unique names.
             (iv) Careless  decomposition may         (iv) The order in which data are stored
                 lead to a bad database design and        does not matter.
                 severe problems.

                                                 460
                                                                for Advanced Secondary Schools



     Computer Science Form 5.indd   460                                                     23/07/2024   12:34
   464   465   466   467   468   469   470   471   472   473   474