0% found this document useful (0 votes)
774 views

DBMS Practical Slips

1. The document describes three different scenarios involving entities and their relationships. The first scenario involves branches, accounts, and customers. The second involves students, subjects, and teachers. The third involves items, suppliers, and customers. Each scenario provides example queries to solve related to the entities and relationships described.

Uploaded by

Amit Bhat
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
774 views

DBMS Practical Slips

1. The document describes three different scenarios involving entities and their relationships. The first scenario involves branches, accounts, and customers. The second involves students, subjects, and teachers. The third involves items, suppliers, and customers. Each scenario provides example queries to solve related to the entities and relationships described.

Uploaded by

Amit Bhat
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

Consider following entities and their relationships BRANCH (Br_ID, Br_Name, Br_City) ACCOUNT (Acc_No, Acc_Type, Acc_Amt) CUSTOMER (Cust_No,Cust_Name, Cust_Addr, Cust_City) Account type can be Loan or Deposit, BRANCH, CUSTOMER and ACCOUNT are related with ternary relationship. Create RDB for above and solve the following queries in ORACLE a) List the name of the branch and the number of loan accounts in that branch for each branch. b) List the name of the customer having an account with maximum deposit amount. c) List the name of the customers having an account in Pune Camp branch. d) List the name of the customer along with branch names in which they have loan account.

2. Consider the following entities and their relationships STUDENT (RollNo, Name, Address, Class) SUBJECT (Code, Subject_Name, Teacher_Name) STUDENT and SUBJECT are related with many-to-many relationship Create the RDB for the above and solve following queries in ORACLE a) List the name of the students to whom Mr. Bhat is teaching along with subject he is teaching to them. b) List the name of the teachers who are teaching to the student Anil Sharma. c) List the name of all teachers along with total number of students they are teaching to. d) List the name of the teacher who is teaching the maximum number of subjects.

3. Consider following entities and their relationships ITEM (Item_No, Item_Name, Unit_of_Measure) SUPPLIER (S_No, S_Name, S_Addr, S_City) CUSTOMER (C_no, C_name, C_Addr, C_City) ITEM, SUPPLIER and CUSTOMER are related with ternary relationship along with descriptive attribute Cost Create RDB for above and solve the following queries in ORACLE a) List the average cost with which the supplier DIGITAL COMPONENTS is supplying Monitor to the customers. b) List the names of suppliers who have sold Keyboard at higher price along with the name of customer to whom he have sold it. c) List the name of items purchased by customer ABC Ltd. d) List the name of the suppliers who have supplied items to customer living in the same city as that of supplier.

You might also like