Introduction to Table:
In this scenario, the data in an RDBMS is stored in database objects which are known as tables. The database contains one or more tables. The table consists of columns and rows and is basically a collection of related data.
A table is the most common and simplest form of data storage in a relational database(RD) . The following is an example of a EmployeeInfo table −
Introduction to Field:
Commonly, the field are columns in the table. In the table, the field is designed to maintain specific information about every record. The field in EmployeeInfo table consists of Id, Name, Age, Salary, Address .
Introduction to Row:
Each individual entry that exists in a table is known as row. Example, there are 3 records in the above EmployeeInfo table. Below is a single row of data or record or row in the EmployeeInfo table −
Introduction to Column:
Columns are known as a vertical entity in a table that contains all information associated with a specific field in a table .
Example, a column in the EmployeeInfo table is Address which represents location as shown below −
Introduction to SQL Constraints:
The rules enforced on columns of a table is known as Constraints. The Constraints are used to limit the type of data that can go into a table. Constraints ensures the accuracy and reliability of the data in the database.
- NOT NULL Constraint − Restricts a column to have a NULL value.
- DEFAULT Constraint − Set/Ensures a default value for a column when none is specified.
- UNIQUE Constraint − Restricts the duplicate values in a column .
- PRIMARY Key − Primary key are used to Uniquely identifies each row/record in a database table.
- FOREIGN Key − Foreign key are used to Uniquely identifies a row/record in any another database table.
- CHECK Constraint − The CHECK constraint checks the certain conditions in a column.
- INDEX − The INDEX are used to create and retrieve data from the database very quickly.