explain several types of constraints that can be


Explain several types of constraints that can be specified using CREATE TABLE command. Explain CASCADE and RESTRICT clauses of DROP SCHEMA command?

Constraint Description
PRIMARY KEY Determines that column(s) uniquely identifies each record. The primary key cannot be NULL, and the data value(s) must be unique.

FOREIGN KEY In a one-to-many relationship, the constraint is added to the "many" table. The constraint ensures which if a value is entered into a specified column, it must already exist in the "one" table, or the record is not added.

UNIQUE Ensures that all data values stored in a specified column are unique.
The UNIQUE constraint differs from the PRIMARY KEY constraint in which it permits NULL values.
CHECK Ensures in which a specified condition is true before the data value is added to a table. For example, an order's ship date cannot be previous than its order date.

NOT NULL Ensures in which a specified column cannon contain a NULL value. The NOT NULL constraint can just be created along with the column-level approach to table creation.

Prevents the DROP from taking place if any dependent objects exists (RESTRICT) or causes all dependent objects do also be dropped (CASCADE).

Request for Solution File

Ask an Expert for Answer!!
Database Management System: explain several types of constraints that can be
Reference No:- TGS0283372

Expected delivery within 24 Hours