Database
Database
Alphanumeric Types:
This data type is used to store information which has alphabets as well as numbers for example address, book summary field etc. The
different types of Alphanumeric Types available are listed here.
Binary Types:
Binary data types are used for storing data in binary formats. Binary data types in a database can be using for storing photos, music files, etc.
DATE TIME:
Date time data types in a database can be used for storing information such as date of birth, date of admission, date of product sale, etc.
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:
1. AutoValue – if set to yes then field will get the auto numeric values.
2. Length – By default length of the field is 10 but the size of the field can be set to maximum length.
3. 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.
4. 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:
1. 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.
2. Length – By default length of the field is 10 but the size of the field can be set to maximum length.
3. 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.
4. 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
1. Save time as there is no need to enter the same data in separate tables.
2. Reduce data-entry errors.
3. 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- In this relationship, both the tables must have primary key columns.
2. 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.
3. 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.