Assignment 1 - 21bce0324dbms
Assignment 1 - 21bce0324dbms
21BCE0324
Date: 06.05.2023
Assessment 1
Exercise: I
EMPLOYEE
TIRTHANKAR GUPTA
21BCE0324
DEPARTMENT
PROJECT
3.
TIRTHANKAR GUPTA
21BCE0324
4.
5.
6.
7
TIRTHANKAR GUPTA
21BCE0324
8.
9.
TIRTHANKAR GUPTA
21BCE0324
10.
11.
12.
TIRTHANKAR GUPTA
21BCE0324
TIRTHANKAR GUPTA
21BCE0324
Exercise: II
Aim: To know how the constraints are used to make table is consistent.
The combination of Employee SSN and Project Number must be a Primary Key
Name: Dependent
The combination of Employee SSN and Dependent Name must be a Primary Key.
Code Snippet
TIRTHANKAR GUPTA
21BCE0324
TIRTHANKAR GUPTA
21BCE0324
TIRTHANKAR GUPTA
21BCE0324
TIRTHANKAR GUPTA
21BCE0324
TIRTHANKAR GUPTA
21BCE0324
Output
TIRTHANKAR GUPTA
21BCE0324
TIRTHANKAR GUPTA
21BCE0324
TIRTHANKAR GUPTA
21BCE0324
Questions
1. Add Foreign Keys using Alter Table [if not done earlier].
2. Drop Foreign key defined on SuperSSN and add it using Alter table command.
3. Make name of Project as Unique and sex of employee as not null.
4. Make Address as a new type containing door no, street, city, State, Continent.
5. Make salary of employee to accept real values.
TIRTHANKAR GUPTA
21BCE0324
Tables after update