DBMS_QP_SET
DBMS_QP_SET
DBMS_QP_SET
Define the
relationships based on the given schema.
Dnum is a foreign key that identifies the department to which a faculty belongs. Odno is a
foreign key, identifying the department that offers a course.
2. Consider the schema for the Movie Database. Design an ER model for the database.
Define the relationships based on the given schema.
4. Design an ER model for the College management system database. Define the relationships based
on the given schema.
STUDENT (USN, SName, Address, Phone, Gender) SEMSEC (SSID, Sem, Sec)
CLASS (USN, SSID)
SUBJECT (Subcode, Title, Sem, Credits)
IAMARKS (USN, Subcode, SSID, Test1, Test2, Test3, FinalIA)
Create tables based on the above schema, add constraints (PRIMARY KEY, FOREIGN KEY), and
insert relevant data.
1. List all the student details studying in the fourth semester ‘C’ section.
2. Compute the total number of male and female students in each semester and
each section.
3. Display semwise student details along with semester and section in ascending
order.
4. Create a view of Test1 marks of students for the given USN in all subjects.
6. Design an ER model for the library management system database. Define the
relationships based on the given schema.
BOOK (Book_id, Title, Publisher_Name, Pub_Year)
BOOK_AUTHORS (Book_id, Author_Name)
PUBLISHER (Name, Address, Phone)
BOOK_COPIES (Book_id, Branch_id, No-of_Copies)
BOOK_LENDING (Book_id, Branch_id, Card_No, Date_Out, Due_Date)
LIBRARY_BRANCH (Branch_id, Branch_Name, Address)
Create tables based on the above schema, add constraints (PRIMARY KEY, FOREIGN
KEY) and insert relevant data.
Customer(Customerno, Cname)
CUST_ORDER (Orderno, Odate, Customerno, Ord_amt)
ITEM (Itemno, Item_name, Unit_price)
ORDER_ITEM (Orderno, Itemno, Qty)
1. List the details of customers who have placed more than 3 orders in a day.
2. List details of items whose price is less than the average price of all items in each order.
3. List the details of items that are present in 25% of the orders.
4. Create a view that keeps track of the detail of each customer and the number of orders placed.
5. Create a procedure to update the unit price of an item by passing a percentage increase of price
to the procedure.
10. Design an ER diagram for a Hospital management system Database application with all the
required keys. Define the relationships based on the given schema.
Practice Questions: