keys_pk_fk_constraints |
You may throw a ball who will umpire your input. A foreign key
constraint from a distant table, will raise a flag for invalid data
entry. |
Let us look at this two tables.
|
A primary key can hold the bal in court. Table: dept Type of constraints: |
Table "emp" under foreign constraints
Constrints |
table joblist.
Constraints on the table joblist
|
Consider this new insert insert into emp values (7934,'Mathew','clerk',7789,'23-jan-87',1300,null,150);
|
Data Type Flaws : Numeric over flow at dept no constraint:
Error Numeric Overflow: The dept no should be two digits " less than 10^2. " ERROR: numeric field overflow |
Primary Key violation: 1st configuration constraint check, note
deptno= 50 does not exists; debugging one error at a time. Query Script: insert into emp values
|
Foreign Key Constraints: Restricting bad data input in a relational
database system. Query Script: insert into emp values |
Correct Data Input: Query Script: insert into emp values |
Final Review: Row 15 was added.
|