Page 447 - Computer_Science_F5
P. 447

Computer Science  (b) Network database model  Because  of  this,  the  network  database
                                                     model  was the most extensively  used
           The network database model is designed
                                                     database model before the introduction
           to  flexibly  represent  objects  and  their
                                                     of the relational model.
           relationships.  Data is organised more
           like a network in this model, and many
          FOR ONLINE READING ONLY
           parent nodes are allowed as shown
           in Figure 8.3.  The network model                         Stores
           extends the hierarchical structure since
           it provides many-to-many relationships      Clerks                    Customers
           to be managed  in a tree-like  structure
           with multiple parents. Because more
           associations are developed in this                      Transactions
           database model as the data become
           increasingly  connected,  accessing  the
           data becomes quicker and faster, and                      Items
           redundancy is managed more efficiently     Figure 8.3: An example of a network
           than in the hierarchical approach.                      database model


           (c) Relational database model
           A relational database model represents data in which all items are organised into
           two-dimensional tables known as relations. It is currently the most extensively used
           model. In this paradigm, all data are kept in rows and columns in a table. Thus,
           compared to network and hierarchical models, the basic structure of a relational
           database model is simple, and it is readily scaled up because we may add as many
           rows and columns as needed. For example, in the student table, shown in Figure 8.4
           you can see columns (attributes or fields) and rows (tuples or records).

                                                        Attribe
                   Relation Name                       (column)



                  STUDENT
                           Name       Student_ID  Home_phone  Address  Office_Phone  Age   Gpa
                       Juma Rashid   120-88-3221  0773663288  123 Kusini  0772009923  25  3.2
                       Chausiku Mawazo 123-78-7689  0788712676  1454671 DSM NULL   18   2.7
           Tuple       Anna Majuto   888-08-7635  0625675412  543 Arusha  NULL     19   3.5
            (row)      Kulwa Doto    762-87-2596  0754431298  45 Kahama  0713988776  27  3.1
                       Amina Karatasi  782-90-8754  0652870657  1276 Pemba  0772896514  23  4.1

                             Figure 8.4: The attributes and tuples of a student table


                                                 438
                                                                for Advanced Secondary Schools



     Computer Science Form 5.indd   438                                                     23/07/2024   12:34
   442   443   444   445   446   447   448   449   450   451   452