In this article we will discuss the Comprehensive notes on referential integrity IT class 10. This topic is the part of perform operations on table which is one of the learning outcomes of the Unit 3 Database Management System for IT 402.
What is referential integrity IT class 10?
As now you are familiar with the terms primary key and foreign key which is used for referential integrity. These keys link more than one table with each other. The referential integrity help to maintain the accuracy and consistency of data in the relational database. Let’s start an article referential integrity IT class 10 with advantages.
Advantages of referential integrity in database
- Add records into the referenced table even there are no matching records in the parent table (Primary Key table)
- Update records automatically when changes made to the parent table
- Delete records from automatically from the parent table
- Allows to retrieve linked data as and when required
- Save the time of database developer
- No need to enter the same data in separate tables
- reduce data entry errors
- Summarize data from related tables
Now we will see the types of relationship in the next section of referential integrity IT class 10.
Types of relationship
There are three types of relationships:
- One to One: Each record of one table is related to one record of another table.
- One to Many or Many to one: Each record of the table is related to one or more than one records in another table.
- Many to Many: This type of relationship links or more records with one table to another table’s one or more records.
Creating and Editing relationships between table
Now we will see how to create a relationship using OO base for referential integrity IT class 10. By using relationship we are going to provide a connection or link or association between two tables. Hence it avoids data redundancy, in simple words, data duplicity can be avoided.
Steps to Create a relationship in OO Base
Create table to create relationship with primary key and foreign key. You can create relationship in two ways:
- Through Menu: Insert > New Relation
- Drag and Drop > Drag Primary Key column to related column into the another table
Follow the below given steps to create relationship in OO base.
- Click on Tool > Relationships. A new window appears to add tables in the relationship.
- If tables are not available, click on Insert > Add Tables option or click on Add Tables icon on the taskbar.
- Click on Insert > New Relations. A new window appears to select the Tables, fields, update options, and delete options. Select appropriate fields and options then click on the OK button. If you want to create a relationship using drag and drop click on the field of the primary key of one table and link them with the foreign key of the child table.
Similarly, you can set the relationship of other types as well. When you add a relationship, the relation design window show one line that connects your tables.
In the next section of referential integrity IT class 10 we will discuss remove relationship.
Removing relationship is quite simple. You can remove this relationship using one of the following:
- Click on connecting line and press delete key.
- Click on connecting line and do right click, then select Delete option.
Edit relationship is quite similar to delete relationship, click on connecting lines and do right click on table and select edit option.
Click here to read notes of Database Management System:
With this I am going to conclude the article referential integrity IT class 10. So I hope you understood the concept very well. Share this article with your groups and share your views or feedback or suggestions through comments.
Feel free to ask your doubts or queries through comments.
Thank you for vising our blog. Keep visiting, Keep Learning.