OraclePLSQL-Page5
πData Constraints
Business rules, which are enforced on data being stored in a table are called constraints.
Types of data constraints:
1)I/O Constraint
2)Business Rule Constraint
πI/O Constraint
This data constraint determines the speed at which data can be inserted or extracted from a table.
Types of I/O Constraint
✅Primary Key
✅Foreign Key
✅Unique Key
πPrimary Key
Primary Key is a column or a set of columns that uniquely identifies a row. Its main purpose is the record uniqueness.
Primary Key will not allow duplicate values.
Primary Key will also not allow null values.
One table can combine up to 16 columns in a composite primary key.
πPrimary Key Constraint defined at Column Level:
πPrimary Key Constraint defined at Table Level:
πSimple Primary Key
A single-column primary key is called a simple primary key.
πComposite Primary Key
A multicolumn primary key is called composite primary key.
Comments
Post a Comment