Page 240 - IT_V1.0_Class10
P. 240

If  both  these  options  are  activated,  then  updating/deleting  record  from  Student  table  will
                       automatically update/delete record from Student_Marks table also.

                       LibreOffice Base offers four options for maintaining referential integrity:
                         No Action: Default setting that prevents updating or deleting records in the master table if
                       related records exist in the transaction table.

                           Update Cascade: Allows updates or deletions in the master table and automatically updates or
                          deletes corresponding records in related transaction tables.
                           Set NULL: Assigns a NULL value to related fields if the master record is updated or deleted.
                           Set Default: Assigns a fixed default value to related fields if the master record is updated or
                          deleted.

              Step 10: Click on the OK button.




















                                   9




                                  10



              Step 11: Click on the Save button from the Standard toolbar to save the relationship.
              The relationship between the Student table and Student_Marks table is established so updating or deleting
              records from Student table will automatically update/delete records from Student_Marks table.
              But if one tries to update records from Student_Marks table, then an error message will be displayed and
              it will not allow to update records from the Student_Marks table. Now, let us see how a relationship works.

              Step 1:  Double-click on Student table from the Tables pane to add records in the table.

                       The  Student table opens in
                       Table Data View window.
              Step 2:  Add new  records in the           3
                       Student table.
              Step 3:  Click on  the  Save  current
                                                                                                                    2
                       record     button    in    the
                       Table    Data    toolbar    to
                       save  the  modifications  in                      Records added in Student table
                       the table.




                238     Information Technology Play (Ver 1.0)-X
   235   236   237   238   239   240   241   242   243   244   245