0% found this document useful (0 votes)
34 views

Primary Key Constraints Not Null Constraints Check Constraints Unique Constraints

Oracle uses constraints to enforce important business rules, such as requiring employees to have a national insurance number and manager. There are five types of constraints: primary keys, not null constraints, check constraints, unique constraints, and referential integrity constraints. Primary keys must be not null and unique, columns cannot be null, check constraints specify valid column values like salary caps, unique constraints ensure rows have unique values like national insurance numbers, and referential integrity constraints cross-reference other tables to validate relationships between data.

Uploaded by

Manjeet Singh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Primary Key Constraints Not Null Constraints Check Constraints Unique Constraints

Oracle uses constraints to enforce important business rules, such as requiring employees to have a national insurance number and manager. There are five types of constraints: primary keys, not null constraints, check constraints, unique constraints, and referential integrity constraints. Primary keys must be not null and unique, columns cannot be null, check constraints specify valid column values like salary caps, unique constraints ensure rows have unique values like national insurance numbers, and referential integrity constraints cross-reference other tables to validate relationships between data.

Uploaded by

Manjeet Singh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Oracle enforces important business rules via constraints, for instance all employees must have a national insurance

number and a manager to report to, they force data to conform to certain rules. There are five different constraints
Primary key constraints Not Null constraints Check constraints Unique constraints A primary key is basically a key which is Not Null and Unique A tables column cannot be Null, it must contain a value Ensure that a tables column is within some parameters that you have specified, for example a employee's salary must not exceed !!,!!!" Ensure the uniqueness of the rows in the table, for example national insurance number would be unique to each employee Ensure that values for certain important columns make sense basically cross referencin# other tables, for example confirm that the department exists in the department table" $he reference is know as a forei#n key and the table is the child table which the actual data held in the parent table" %t is possible for a table to have a self referential inte#rity constraint"

Referential integrity constraints

You might also like