Perform Operations on Table in Open Office Base
In Base, data is kept in tables that may be added to, changed, or deleted by using the proper options.
Insert Data in the Table
- Step 1 : Select the table > Double click on it
- Step 2 : The table will open in Datasheet View
- Step 3 : Now you can Insert Number of records in Datasheet View
Editing Records in the Table
- Step 1 : Select the table > Double click on it.
- Step 2 : The table will open in Datasheet View
- Step 3 : Edit the record as per the requirement
Deleting Record From the Table
- Step 1 : Select the table > Double click on it.
- Step 2 : The table will open in Datasheet View
- Step 3 : Right click on data and select delete option
Field Properties
To modify the field’s attributes It is necessary to modify the table structure in design view. The following actions will be taken to set the field’s properties:
Select the table > Right click > Select the option Edit > the table Design View window will open
Following are some properties of data of the numeric type:
- AutoValue – if set to yes then field will get the auto numeric values.
- Length – By default length of the field is 10 but the size of the field can be set to maximum length.
- Default Value– A default value can be set for a field if user don’t provide any value while entering the values in the table.
- Format example – This property helps to set the format of the data entered in the field such as 91-222-333.
Following are some properties of data of the character type:
- Entry Required – if set to yes then it will be must to insert the value in the field which means that field cannot be left blank.
- Length – By default length of the field is 10 but the size of the field can be set to maximum length.
- Default Value – A default value can be set for a field if user don’t provide any value while entering the values in the table.
- Format example – This property helps to set the format of the data entered in the field such as 91-222-333.
Sorting Data
Sorting means to arrange the data in either ascending order of descending order. Sorting is the process of putting data into a meaningful order so you can evaluate it more efficiently.
Referential Integrity
The relationship between tables is referred to as 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:
1. Adding records to a related table if there is no associated record available in the primary key table.
2. Changing values in a primary if any dependent records are present in associated table(s).
3. 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
An association or link between two or more tables is referred to as a relationship. You don’t have to enter the same data again in different tables when you relate two 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.
Type of Relationships in Database
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
ONE to ONE
In this relationship, both the tables must have primary key columns.
ONE to MANY OR MANY to ONE
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
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.
Note :
Removing the Relationships : With the use of the Delete option, the relationships that have been applied to the tables can also be deleted. When you right-click a relationship thread, the Delete option will appear.