Update, Delete and Drop. DDL - Data Definition Language
Update, Delete and Drop. DDL - Data Definition Language
What is RDBMS?
A Relational database management system (RDBMS) is a database management system (DBMS) that is based
on the relational model as introduced by E. F. Codd.
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.
SQL Constraints: Constraints are the rules enforced on data columns on 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.
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.
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.
By default, a column can hold NULL values. If you do not want a column to have a NULL value, then you
need to define such constraint on this column specifying that NULL is now not allowed for that column.
A NULL is not the same as no data, rather, it represents unknown data
UNIQUE Constraint:
The UNIQUE Constraint prevents two records from having identical values in a particular column.
PRIMARY Key:
A primary key is a field in a table which uniquely identifies each row/record in a database table. Primary
keys must contain unique values. A primary key column cannot have NULL values.
A table can have only one primary key, which may consist of single or multiple fields. When multiple
fields are used as a primary key, they are called a composite key.
FOREIGN Key:
A foreign key is a key used to link two tables together. This is sometimes called a referencing key