You are on page 1of 3

DATABASE MANAGEMENT SYSTEM

LAB 10

Name: Qazi Mujtaba Mehmood

Enrollment: 01-235171-050

1. Create 2 table having fields of your personal data, and another table having fields or your
Projects you have worked. Choose attributes of your own. There must be 6 attributes in your
table.Tables have one to many relationships. Create foreign key accordingly.
Solution:

2. Insert 8 record in both tables using insert command


INSERT INTO table-1 [(column-list)] VALUES (value-list)
Solution:
3. Ask user to update value of any column and then update the column by asking user new value of
updated column. Execute this query thrice.

UPDATE table-1 SET set-list [WHERE predicate]


E.g. UPDATE s SET name = 'Tony', city = 'Milan' WHERE sno = 'S3'
Solution:
4. Delete value of column entered by user and then ask user to enter the value of that column and
delete that specific record. Execute this query thrice.
DELETE FROM table-1 [WHERE predicate]
DELETE FROM sp WHERE pno = 'P1'
Solution:

You might also like