First, Let’s understand what is RDBMS ?
A relational database management system (RDBMS) is a program that lets you create, update, and administer a relational database. Most RDBMS’s use the Structured Query Language (SQL) to access the database.
In RDBMS data is structured in database tables, fields, and records. Each RDBMS table consists of database table rows. Each database table row consists of one or more database table fields.
In RDBMS data is represented in terms of rows. A relational database is most commonly used the database. It contains a number of tables and each table has its own primary key.
Due to a collection of the organized set of tables, data can be accessed easily in RDBMS.
What is Table?
The RDBMS database uses tables to store data. A table is a collection of related data entries and contains rows and columns to store data.
A table is the simplest example of data storage in RDBMS.
Let’s see the example of Employee table.
What is Field?
Every table is broken up into smaller entities called fields. The fields in the EMPLOYEES table consist of EMPLOYEE_ID, FIRST_NAME, EMAIL, SALARY.
A field is a column in a table that is designed to maintain specific information about every record in the table.
What is row or record?
A row of a table is also called record. It contains the specific information of each individual entry in the table. It is a horizontal entity in the table. In our above example, we have 9 rows or records.
What is a NULL value?
A NULL value in a table is a value in a field that appears to be blank, which means a field with a NULL value is a field with no value.
Null in oracle is undefined, unassigned and not-accessible value.
It is very important to understand that a NULL value is different than a zero value or a field that contains spaces. A field with a NULL value is one that has been left blank during record creation.
Constraints are the rules enforced on data columns on the table. These are used to limit the type of data that can go into a table. This ensures the accuracy and reliability of the data in the database.
Constraints could be column level or table level. Column level constraints are applied only to one column where as table level constraints are applied to the whole table.
Following are commonly used constraints available in SQL:
NOT NULL Constraint : Ensures that a column cannot have NULL value.
DEFAULT Constraint : Provides a default value for a column when none is specified.
UNIQUE Constraint : Ensures that all values in a column are different.
PRIMARY Key : Uniquely identified each row/records in a database table.
FOREIGN Key : Uniquely identified a rows/records in any another database table.
CHECK Constraint : The CHECK constraint ensures that all values in a column satisfy certain conditions.
INDEX : Use to create and retrieve data from the database very quickly.