Page 56 - TCS ICT Book 8
P. 56

The City School  2021-2022





            When you design a database, you divide your information into tables, each of
            which has a primary key and then add foreign keys to related tables that reference
            those primary keys. These foreign key-primary key pairings form the basis for table

            relationships and multi-table queries.

































             3.7.  Constraints in Database


             In a database when we define any field as a Primary

             Key (PK) there are two rules or constraints applied to
             that field automatically.                                             Checkpoint



             Not Null: this constraint enforces that this field cannot       Databases are structured set
                                                                             of data.
             be left unused. In Database terminology, NOT NULL is            Rows are also called records

             not considered as empty or zero, it just defined as the         Columns are also called fields
             data has not been entered yet.




             Unique: this constraint enforces that the data entered in this field cannot be repeated

             or all the values entered should be unique to each other.


















                                                                                                                56
   51   52   53   54   55   56   57   58   59   60   61