DBMS assignment_02
DBMS assignment_02
1)
EMP JOB
EMP_CODE EMP_LNAME JOB_CODE
JOB_CODE JOB_DESCRIPTION
14 Nimal 2
15 Sadun 1 1 Clerical
16 Ajith 1 2 Technical
17 Kamal 3
3 Managerial
20 Gayan 2
PLANS EMP_PLAN
PLAN_CODE PLAN_DESCRIPTION EMP_CODE PLAN_CODE
1 Term life 15 2
2 Stock purchase 14 3
Long-term 16 1
3
disability 17 1
4 Dental 17 3
17 4
20 3
I. Create the above four tables using SQL statements and insert the given (20 Marks)
values to the tables. Identify the suitable domains for each attribute.
(Important:-Consider about the correct primary keys and foreign keys).
c) The minimum emp_code and give the column name as min_emp. (05Marks)
2)
3)
Create the following two tables using SQL statements. Use the suitable (30 Marks)
Domains for each attribute. (Important:-Consider about the
correct primary keys and foreign keys.)