DBMS Lab Sheet - 2 Shared
DBMS Lab Sheet - 2 Shared
Assignment:
1. Create the movie database with the following relation schema where the
primary keys are underlined.
2. Write database name and draw table with records of 5 clients as per details
given below then write commands/sql query for respective operations in the
database.
a. Create database clients.
b. Create table client_info including columns:
client_id(int), client_name(varchar), client_address(varchar), dateofpurchase(date)
c. Modify the table client_info by adding column contact_info.
d. Modify the table client_info by changing the type varchar of client_address column to
text.
e. Drop the column client_address from the client_info table.
f. Insert at least five records in the client_info table.
g. Display all records from table client_info table.
h. Display record of a client whose id is 3.
i. Display all records from table client_info table in ascending order.
j. Display all records from table client_info table in descending order.
k. Update contact_no of client whose client_id is 1 to 9841999999.
l. Update client_name, client_address, contact_no using update command of at least one
client.
Note: Export the database file before running the following command for backup
of the database.