Professional Documents
Culture Documents
DBMS Paper
DBMS Paper
DBMS Paper
Q.9 (5)
Consider following schema:
Employee (Employee_name, street, city)
works (Employee_name, company_name, salary)
company (company_name, city)
Manages (Employee_name, manager_name)
write each of the following queries in SeL
(i) Find allEmployees in the database who live in the same city as the companies for
which they work
(ii) Find all employees in the database who live in the same cities and on the same street
as do their managers
(iii) lind allEmployees in the database who do not work for first bank corporation
(iv) Find.all employees in the database who earn more than each emptoyee small bank
corporation
Q.10 Describe three level of DBMS Architecture? Explain referentiat integrity by example. (5)
Q.ll \Mrat is relationship type. Explain cardinality and degree of relationship by example. (s,
PART - C: (Aftempt 3 questions out of 4) Max. Marks (30)
Q.l2 Draw the diagram of system structure of DBMS. Write down the main function of each (r0l
component.
Q.13 Draw ER Diagram and convert.jt into logical database design for Banking Business (iO)
Scenario. Assumptions are as follows :
'There are multiple banks and each bank has many branches. Each branctr has muttiple
customers
. Customers have various types of accounts
' Sorie Customerc also had taken different types of loans from these bank branches
. dne customer can have multiple accounts ind loans
Q.14 Considerthe schema given in Q9 and write each of the following queries in SeL: (f 0)
(i) Find all Employees who earn more than the average satary-oi aii.rfioy"""
of their
company
(ii) Find the company that has the most employees
,(iii) Find the company that has the srnallest payroll
'(iv) Find those com-panies
whose emptoyee eam a high salary on average than the
average salary at small bank corpordion
Q.1s (al Let R = (A, B, C) and let ri ?fid 12 both be relation an schema R. Give an expression in (5)
SQL that is equivalent to each at the following queries:
(i) r, w1
(ii) r, nr,
(iii) 11 - 12
(iv) l-l a.a ( rr ) X Fl a.a ( re )
(b) What is JDBC? Explain establishing a connection to the database. Create statement, (5)
execute query and iterate result set in JDBC.