Вы находитесь на странице: 1из 17

DBMS

(CSN 208)
LAB ASSIGNMENT

Submitted to : Alka Jindal

Submitted by : Tamanna Puaar

16103077

CSE ,2 year

1
S.NO Title Page no. Remarks
1. A Table EMP has employee id ,
employee name (unique),
department number (foreign
key) and other fields.
2. DEPT table
3. Apply not null constraint on an
attribute of EMP table.

4. Apply unique key constraint


on an attribute on EMP table
5. Apply primary key constraint
on DEPTNO of DEPT table.
6. Apply foreign key constraint
on DEPTNO in EMP table .It
references the DEPTNO of the
DEPT table.
7. Remove the existing constraint
from the table.
8. Remove a PK constraint on the
DEPT table and drop the
associated foreign key
constraint on the
EMP.DEPTNO column.
9. Activate and deactivate an
integrity constraint on EMP
table.

10. View all the user constraints.


Activate and deactivate an
integrity constraint on EMP
table.

2
ASSIGNMENT 1
QUESTION 1: A Table EMP has employee id , employee name (unique), department number (foreign
key) and other fields.

3
4
QUESTION 2: DEPT table

5
QUESTION 3: Apply not null constraint on an attribute of EMP table.

6
7
QUESTION 4: Apply unique key constraint on an attribute on EMP table

8
QUESTION 5: Apply primary key constraint on DEPTNO of DEPT table.

9
10
QUESTION 6: Apply foreign key constraint on DEPTNO in EMP table .It references the DEPTNO of the
DEPT table.

11
QUESTION 7: Remove the existing constraint from the table.

12
13
QUESTION 8: Remove a PK constraint on the DEPT table and drop the associated foreign key
constraint on the EMP.DEPTNO column.

14
15
QUESTION 9: Activate and deactivate an integrity constraint on EMP table.

QUESTION 10: View all the user constraints.

16
17

Вам также может понравиться