Page 236 - IT_V1.0_Class10
P. 236

Deleting a Table

              In LibreOffice Base, deleting a table involves removing its structure and all associated data. To delete a table,
              perform the following steps:
              Step 1:  Right-click the  table  from the  Tables pane in
                       which column/field is to be inserted. In our case,
                       we have right-clicked the Student_Info table.
              Step 2:  Select the Delete option from the context menu.
                       The  LibreOffice  Base  message  box  opens  that
                       prompts you to delete the table.

              Step 3:  Click on the Yes button to delete the table.
                                                                                                3
                 RELATIONSHIP

              A relationship refers to the connection between different tables in a database, established by matching data
              based on a common field, often the primary key in one table and the foreign key in another. This relationship
              ensures  data  integrity  and  allows  for  more  efficient  data  retrieval  and  management  across  the  tables.
              Relationships give the facility to join two or more tables by using a common field so that we can retrieved
              data from multiple tables at the same time. Relational databases support different types of relationships
              between tables which are designed to enforce the concept of referential integrity. LibreOffice Base supports
              different types of relationships among tables.

              Types of Relationships

              There are three important types of relationship that can be created in a database which are as follows:
                One-to-One: In this type “One record of Master table is related to only one record of Transaction Table”.
                 It is represented as a 1:1 relationship.
                Let us understand the concept of One-to-One relationship with the help of example.

                                       Table: Person

                                          PersonID        Name           Age        Address
                                       (Primary Key)
                                              1            Rohit         24          Delhi
                                              2           Gaurav         28         Meerut
                                              3          Jaspreet        29          Delhi
                                              4           Mohit          31         Kanpur
                               Table: Passport

                                 PassportID         Pass_Num           ExpiryDate        PersonID
                                (Primary Key)                                          (Foreign Key)
                                     101             B12345            2027-05-15            1
                                     102             B23456            2026-03-20            2
                                     103             A12465            2026-05-15            3
                                     104             A34234            2027-03-20            4
                In the given relationship, each person has exactly one passport, and each passport belongs to exactly one
                 person. So, the relationship between Person and Passport tables is one-to-one.





                234     Information Technology Play (Ver 1.0)-X
   231   232   233   234   235   236   237   238   239   240   241