Insert
Re-create the candidate table as such:
Candidate
Candidate_id (Primary key)
First_name (UK composite)
Last_Name (UK composite)
DOB
Salary (check constraint Salary > 10000 and less than 50000)
Party_id (FK)
Re-create the Party table as such:
Party
Party_id (Primary key)
PartyDesc (Unique key)
You may get an error message on some of these and it may be correct
1) Create the above tables with all the proper constraints. Name all the constraints. All
the constraints should be in the CREATE TABLE statement.
2) Insert two rows into each of the above tables. You have to populate the tables in the
proper order (You should not get an error for this)
3) Insert two rows into the Candidate table. Populate all the fields. In one row insert the
date using the (mmddyy) format. In another one insert it using (ddyymm) format.
4) Display the DOB information from the candidate table in mmddyyyy format
5) Display the DOB information from the candidate table in ddyyyymm hh12:mi:ss
format
6) Insert another row into candidate table such that it violates the check constraint
7) Insert another row into party such that it violates the Unique constraint
8) Display the constraint information on both tables using the system table
user_constraints