Typed Notes - RDBMS
Typed Notes - RDBMS
RDBMS
Complete Chapter
categories:
i. Numeric Types
ii. Alphanumeric Types
iii. Binary Types
iv. Date time
v. Other Variable types
Numeric Types
● Numeric data types are used for describing numeric values for
the field used in the table of a database.
● Numeric data types in a database can be used for storing
information such as mobile number, roll number, door
number, year of school admission, true or false statements,
statistical values, etc.
Name Data Type Description
BOOLEAN Yes/No Values as 0 or 1 Example – Yes or
No
TINYINT Tiny Integer Store Integer Range between 0 to
255
Alphanumeric Types
● LONGVARCHAR, CHAR, VARCHAR, VARCHAR_IGNORECASE
Name Description
Other/Object Stores serialized java objects
Table data view dialog box
Start typing the records in the table and
select File > Save Current record to save
data in the table.
Inserting Data in the Table
● 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
Sorting Data
● Sorting means to arrange the data in either ascending
order or descending order.
● Select the column(s) then click on sort buttons. The
data will be displayed accordingly.
Field Properties
● Select the table > Right click > Select the option Edit > the table
Design View window will open.
● In design view there are different properties of fields according to
the data type set for each field.
● 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.
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.
● Deleting records from a primary key table if there are any matching
related records available in associated table.
Relationship between tables
● A relationship refers to an association or connection
between two or more tables. When we relate two tables,
we don't need to enter the same data in separate tables.
● Advantages of Relationship :
● Save time as there is no need to enter the same data in
separate tables.
● Reduce data-entry errors.
● Summarize data from related tables.
Relationship between tables
● Steps:-
● Tools > Relationships…
1. ONE to ONE
2. ONE to MANY or MANY to ONE
3. MANY to MANY
Types of Relationships
● One to One Relationship
● In this relationship, both the tables must have primary key columns.
● 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