Page 200 -
P. 200

Q5-2  What Is a Database?

                                                                                        %QNWOPU  CNUQ ECNNGF HKGNFU     199





                                                                         5VWFGPV 0WODGT  5VWFGPV 0COG  *9  *9  /KF6GTO
                                                                                      $#-'4  #0&4'#
                                                                                      .#7  59''
                                                                                      0'.510  567#46
                                                         4QYU
                                                        CNUQ ECNNGF                   (+5%*'4  /#;#0
                                                         TGEQTFU                      6#/  ,'((4';

                                                                                      8'4$'44#  #&#/
                                                                                      8#.&'<  /#4+'
                                                                                      41)'45  5*'..;
                    Figure 5-3
                    Student Table (also called a file)                                   %JCTCEVGTU  CNUQ ECNNGF D[VGU

                             Q5-2              What Is a Database?



                                               A database is a self-describing collection of integrated records. To understand the terms in this defi-
                                               nition, you first need to understand the terms illustrated in Figure 5-3. As you learned in Chapter 4,
                                               a byte is a character of data. In databases, bytes are grouped into columns, such as Student Number
                                               and Student Name. Columns are also called fields. Columns or fields, in turn, are grouped into rows,
                                               which are also called records. In Figure 5-3, the collection of data for all columns (Student Number,
                                               Student Name, HW1, HW2, and MidTerm) is called a row or a record. Finally, a group of similar rows
                                               or records is called a table or a file. From these definitions, you can see a hierarchy of data elements,
                                               as shown in Figure 5-4.
                                                   It is tempting to continue this grouping process by saying that a database is a group of tables
                                               or files. This statement, although true, does not go far enough. As shown in Figure 5-5, a database
                                               is a collection of tables plus relationships among the rows in those tables, plus special data, called
                                               metadata, that describes the structure of the database. By the way, the cylindrical symbol   labeled
                                               “database” in Figure 5-5 represents a computer disk drive. It is used like this because databases are
                                               most frequently stored on disks.


                                                           6CDNG QT (KNG  5VWFGPV 0WODGT  5VWFGPV 0COG  *9   e
                                                                            5VWFGPV 0WODGT  5VWFGPV 0COG  *9   e
                                                                             5VWFGPV 0WODGT  5VWFGPV 0COG  *9   e
                                                                              5VWFGPV 0WODGT  5VWFGPV 0COG  *9   e
                                                                                5VWFGPV 0WODGT  5VWFGPV 0COG  *9   e

                                                                                       )TQWR QH

                                                          4GEQTFU QT 4QYU  5VWFGPV 0WODGT  5VWFGPV 0COG  *9   e
                                                                                                              e
                                                                                       )TQWR QH

                                                          (KGNFU QT %QNWOPU  5VWFGPV 0WODGT  5VWFGPV 0COG  *9
                                                                                                            e
                                                                                        )TQWR QH
                    Figure 5-4                            $[VGU QT %JCTCEVGTU  $  #     -     '     4
                    Hierarchy of Data Elements                                                           e
   195   196   197   198   199   200   201   202   203   204   205