Create Database Schema For A Customer-Sale Scenario.: TH TH

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

1.

Create a Database for movie_show with following tables


Movie (id, title, director, cast, description, duration_minutes).
Auditorium (id, name, seatno)
seat(id, row, number, auditorium_id)
reservation_type (id,reservation_type)
employee (id,name)
i. Insert five records in each table using query.
ii. Update the director, duration minutes, seat no, reservation type for 4th and 5th
record.
iii. Delete the second record for each table using delete query and save it?
iv. Show the table after delete and update records.
v. Show the seats records, movie records and reservation type?
2. Create Database Schema for a customer-sale scenario.

Customer(Cust id : integer, cust_name: string)


Item(item_id: integer, item_name: string, price: integer)
Sale(bill_no: integer, bill_data: date, cust_id: integer, item_id: integer,
qty_sold: integer

For the above schema, perform the following.


a) Create the tables.

b) Insert around 10 records in each of the tables

c) List all the bills for the current date

d) List the details of the customer

e) Give a list of products/items.


f) Create a view which lists out the bill_no, bill_date, cust_id, item_id,
g) Create a view which lists the daily sales date wise

3. Write 4 examples and syntax for Insert, update, delete and select query?

You might also like