PERFORM OPERATIONS ON TABLE
Inserting Data In The Table
To insert the data in the table, follow the steps: Select the table > Double click on it. The table will open in Datasheet View in which data new data can be inserted and existing data can be updated or removed.
Editing Records In The Table
To edit the data either click on edit icon or double on the data in the cell of a table and modifications can be done.
Referential Integrity
Referential integrity is used to maintain accuracy and consistency of data in
a relationship. In Base, data can be linked between two or more tables with the help of primary key and foreign key constraints.
Referential integrity helps to avoid:
Adding records to a related table if there is no associated record available in the
primary key table.
Changing values in a primary if any dependent records are present in associated
table(s).
Deleting records from a primary key table if there are any matching related records available in associated table(s).
Creating and Editing Relationships between Tables
A relationship refers to an association or connection between two or more tables. When you relate two tables, you don't need to enter the same data in separate tables.
Relationships between tables helps to:
Save time as there is no need to enter the same data in separate tables.
Reduce data-entry errors.
Summarize data from related tables.
You can create a relationship between any two tables by selecting Relationships... option from the Tools menu. Add the tables in amongst which you want to create the relationship. Select the tables and click on Add button.
There are three types of relationships which can be created in tables:
1. ONE to ONE
2. ONE to MANY OR MANY to ONE
3. MANY to MANY
There are two ways to create the relationships between the tables:
a. Click on Insert option and select New Relation... option in Relation
Design window.
Select the options as required
b. Drag the primary key column from one table and drop it on the key column of another
table.
One to One Relationship
In this relationship, both the tables must have primary key columns. Example: In the given tables EMP and DEPT, EMP_ID in EMP table and DEPT_ID in DEPT table are the
primary keys.
One to Many Relationship
In this relationship, one of the table must have primary key column.
It signifies that one column of primary key table is associated with all the columns of associated table.
Many to Many Relationship
In this relationship, no table has the primary key column.
It signifies that all the columns of primary key table are associated with all the columns of associated table.
Remove the Relationships.
The relationships applied on the tables can be
removed also with the help of Delete option.
Right Click on the relationship thread and select Delete option.
Comments
Post a Comment