Data Constraints

Rules are enforced on data being entered, and prevents the user from entering invalid data into tables are called constraints.
Oracle permits data constraints to be attached to table columns via SQL syntax that will seek data for integrity. Once data constraints are part of a table column construction, the oracle engine checks the data being entered into a table against the data constraints.
            Both the create table and alter table sql verbs can be used to write sql sentences that attach constraints to a table column.
Once a constraint is attached to a table column, any sql Insert or Update statements causes these constraints to be applied to the data prior to it being inserted into the tables for storage.
 Types of integrity Constraints/Data constraints
Domain Integrity Constraints:-        Maintain value according to the specifications like ‘Not Null’ condition, so the use has to enter  a value for the column on which it is specified. ‘Not Null’ and ‘Check’ constraints fall under this category.
Entity Integrity Constraints:- Maintain a Uniqueness in a record.
Referential Integrity Constraints:- Enforces relation ships between tables
Oracle Allows programmers to define constraints at

Column level Constraints:-   Data constraints are defined along with the column definition when creating or altering table structure, they are column level constraints.
Table Level Constraints:-     If data constraints are defined after defining all the table columns when creating or altering a table structure, it is a table level constraint.
NULL :-         If the column was created as nullable this is oracle default construction Oracle will place a NULL value in the column in absence of a user defined value.

 

For
Online Classes

Contact Us: +919885348743