

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A collection of exam questions related to database management systems (dbms). It covers topics such as er diagrams, sql queries, relational algebra, normalization, query optimization, transaction management, and database recovery. The questions are designed to test students' understanding of fundamental dbms concepts and their ability to apply these concepts to solve practical problems. Questions from tribhuvan university's institute of engineering exams, providing valuable practice material for students preparing for similar exams. It also includes some solutions.
Typology: Exams
1 / 25
This page cannot be seen from the preview
Don't miss anything!


















Examination Control Division
Level BE^ Full Marla 80
Programme BCT Pass Marks 32 Year lPart ru/II (^) iTime 3 hrs. {gD&9LP@3gry3gryg!-$ystem Gr6^ s^ 2)_ Candidates are^ required to give^ their^ answers^ in their own words^ as^ far as^ pr:acticable.
The figures in the margin indicate Full Marks. Assume suitable data if^ necessary.
abstraction and explain. (^) I2+2J a) Identify relevant attributes and construct an ER diagram with proper mapping
belongs to^ only^ one^ departrnent, each deparfinent^ offers^ multiple^ courses, each^ of
by different deparfinents. (^) 16l b) Define unary relationship along with^ example. How^ you convert^ an^ ER relationship into relation schema? Explain with examples of different cardinalities. (^) 12+
Student (crn,^ name, address, phone,^ dob) Course (courseid,^ cffi, duration, fee) Enroll (enrolled,^ cname,^ courseid,^ enrolldata"^ completedata) i) Write the SQL^ statements^ required^ to^ create^ the^ above relations,^ including
*./ (^) ii) Write an expression in SQL to find cm, names and enroll data of all students urlro have taken the^ course'java'^ (cname)
course java^ and^ linux.
crn, name, phone,^ coursename, enrolldata b) Consider the following^ relational^ database^ 12" sailor (sailorid,^ snarne,^ rating,^ age) boat (boatid,^ boatname,^ color) resetres (sailorid,^ boatid,^ date) Write relational algebra expressions^ for^ the^ following: i)t Find^ the names^ of^ sailor who^ has^ reserved boat^ number^ 105. ii) Find the names^ of^ sailors who^ have reserved^ a^ red boat.
iv) Give an expression in QBE to^ find^ the^ sailors^ name^ and^ age^ who^ have reserved^ a
red boat.
{ / {
I
PatientlD, diagnosis) and functional dependencies; doctorlD+doctorName and (doctorlD, patientlD)+diagnosis.
Explain with diagram about process of query processing (^) in RDBMS. How are
example. (^) [5+3] a) Describe (^) about fxed-length record (^) and variable length record along wift examples. (^) t4l b) Describe B+ tree structure used for indexing. (^) t4l
shadow paging and log-based recovery.
14+
t4I
5- a) What is a functional dependency? List the various integrity constraints and e4plain
about the referential (^) integrity (^) along with an (^) example. t3+ b) Define lNF, 2NF (^) and 3NF. Illustrate your:mswer (^) with suitable (^) example.
optimization and (^) Heuristic optimization. (^) ' 14+
is the (^) advantage of using sparse (^) index?
b) What is Spatial Database System?
[2+
[4+
**:l
Examination Control Division
{
Candidates are required to^ give their^ answers^ in their own words^ as^ far^ as^ practicable.
Mention the advantages of^ the^ DBMS^ over^ the^ file^ processing^ system and explain^ briefly. a) Define discriminator in ER^ diagram. Explain different keys^ used^ in^ database design- b) Draw the Entity-Relationship^ Diagram^ (ERD)^ with^ appropriate mapping cardinalities
-gir. Each^ "p1oy". has at^ most^ one recognized^ skill,^
possessed by several employees.^ An^ employee^ is^ able^ to^ operate a^ given machine-type
overtirne d^ ,o.^ of^ them^ are^ paid^ with^ daily^ basis.^ According^ to their^ designation
products from assembly department are stored^ in^ the^ ware^ house.^ Products^ are labeled
Consider the^ following relational^ data^ model Employee (empid,^ ename, age, salarY) Department (deptid, dname, budget,^ managerid) Works (empid, deptid, hours) (i) (^) Write the SQL statements required to^ create the above^ relations,^ including^ appropriate versions of all primary^ and foreign^ key^ integrity constraints.
maximum salary.
t^ i'
aJ. 12"
hours they work
is in between 45 to 50 years.
", TRIBHWAN TIMVERSTTY INSTITUTE OF ENGINEERING Exarnination Control Division
Programme Year lParJ Full Marks i Pass Marks Time Exarn. BE BCT 32 mlil
{
Candidates are^ required to give^ their^ answers^ in their own words^ as^ far^ as^ practicable.
The figures in the margin^ indicste^ FulI Marlu- Assume suitable data^ if^ necessary-
a) What are data models?^ Explain^ various^ tlpes^ of^ data^ models. b) - Design an E-R diagram^ for^ a^ database^ for^ an^ airlines^ system.^ The^ darabase^ must^ keep
individual flights^ and^ the^ schedule and^ routing of^ future^ flights.^ Apply^ all^ the^ database
design constraints as^ much^ as^ possible. a) Consider the following^ relational^ data^ model.
Qgp,attment(dePti d,^ d^ n^ arne)
$orks.-on(empid, pid,^ hours)
relational atgebraic expression for the^ following:
.
b,gdget more than^ 50000.^. I Find^ .the^ total^ number^ of prflects^ from each^ department^ along ttdth,the department name.
i) Find the name^ of^ employees^ who works^ on^ project^ with^ the^ highest^ budgel ii) Create a^ view^ with^ empid,^ name,^ project^ title^ and budget.
Define functional dependency.^ Explain^ partial^ and^ transitive^ functional^ dependency with example.
ll+ u+
[2x3]
[2x3]
b)
b) Define decomposition^ and^ its^ desirable^ properties.^ Explain^ 3NF^ and^ BCNF.
Tl
and why? b) What is indexing? Why^ dpamic^ hashing is^ adnmtageous over static^ hashing?
12+
u+ 14+
12+
t3l
:4i: .)
1
Examination Control^ Division
;;;il;;,;::1,-.;'fi:';Tl::il:::::T::J:tfr-':;,",0,; '/ Attempt All questions. ,/ (^) Thefigures in the margin indicate Futl (^) Mgfis. ,/ (^) Assume suitable data if necessary-
Why is data independence important^ in^ data^ modeling?^ Differentiate^ between^ schema and instances t4]
works at the airport. You need to store the^ name, SSN,^ address, phone^ number and^ salary of each technician. Each technician is^ an^ expert on^ one^ or^ more^ plane^ model(s)^ and^ his^ or her expertise rnay overlap with^ that^ of^ other^ technicians.^ This^ information^ about
Ernptoyoe @namq, street,^ city) Works (Ename, company-.r1ame, salary)
Manages (lina'ine, manager-_nanre)
. a) Write the queries in Relational Algetrra. (^) [2x3]
i. Find all the empioyecs^ name^ who^ rvork in^ 'NMB^ bank', i.i, Find^ all^ the^ ernployee^ names^ who live in^ the^ same^ city^ as^ their company^ is located. iii. Find the name and city of those^ emplo,u*ees^ whose^ salary is greater^ than^30000 and
Q) Write^ SQL queries^ tbr^ the^ follorving.^ l2x3l j-' (^) C-reate Eruployee aqd Works relation rvith primary key and foreigr key constraints.
,ii. Find^ the^ err,rp[oyoe-;;^ fl?me^ theirtrciinpany narne and^ city^ natne^ rvhich^ ends^ lvitb^ 'pur'
,^ iii,^ Ircrease the salary^ of^ each^ em;:loyees by' 25Y, whase^ salary^ is less than 30000.
12+4J
'i (^) Explain the basic^ steps^ in^ query^ processing.^ Make^ distinctions^
opiimization and^ heuristic optimization'
sequential index?
a) what^ are^ schedules?^ Describe^ the^ concept^ of view serializability for^ concurrent
executi on of^ tran^ s^ action'
Expiain the deadlock prevention strategies.
in system. Differe'tiate^ between
shadow paging and^ log-based recovery'
i) Distributed^ database^ sYstem ii) Spatial database^ sYstem 14+ 12+
12+ 12+
[3x2]
Examination Control Division
r ! .,i^ i i .i !i I !
LeVel BE^ Futl Marks 80 Programme BCT Pass Marks 32 Year / Part M/II^ Time^ 3 hrs.
r' (^) Candidates are required to give (^) their answers in their own words as far as practicable. r' (^) Attempt All questions. '/ Thefigures^ in^ the^ margin^ indicate^ Full^ Marks. / (^) Assume suitable data if necessary.
application?Whatisphysicaldataindependence?,
"A Bus Compony owns a number of busses. Each bus is allocoted to o pafticular^ route, olthough some
vehiCles vory (^) ln size ond mn he single or doubl*decked. Each route is identified by a route number '
Driverc hove.on^ empluyee.number, nome, address, ond sometimes o tetephane number." (^) :
Em ployee (g!!, (^) no me, oddress, (^) s u pervisor_eid)
Write relational algebra expressions for the following: [2X4=8]
a) List (^) the pme^ of (^) all employees from Computer department along (^) With the name oJ their supervisor. b) Find the name of alt employees who work on the 'Network monitoring" project for more than 15 hours. cl (^) Delete all projects which (^) belong to the'Electrical' department. d) Find the totai number of projects from each (^) departrnent, along with the department narne. ! I I I .i
Product ( p!!, (^) ndme, price, (^) category; qnaker-cid) Purchase (buyer-ssn,^ seller-ssn, quontfu, pid) Compony (g!d,^ nome, stock price,^ eountryl Percon(g;p, nome, phond aamber, cigy).
*-<_
i I a! Write an SQL query to find the name and price of atl products of 'camera' category made in "laPan".
product (^) name from all transactions. c) Write a query ln SQL to increase the price of all products^ from DELL company by 5 %. d) Wrlte skeleton tables ln (^) QBE to flnd the name and phone number of alt persons who
'-.
cascading actlons in^ referential^ integrityconstraints.^ t3+
b) Briefly explain how to normalize (^) a database from:un-normalized form to lNF, 2NF, 3NF and (^) !$ t5l
f\or,62(o6rpt-nome=lvrusic (^) linstrugtgrX n-r, (^) ig,ti*(teoch.es X^ cou5s:llll
1
i ,l II l I l
-l , l : i I I 1 I I { I ,'!
i,i
I !
!!
:I ! I I
: -.;
iI
l
I
I I I i I
?. al Distinguish between dense index^ and sparse index? What is^ a secondary index? b) Briefly explain how variable length^ records are stored^ in^ databases?
&.' ..trf .,i " (^) :.t,
[4+4] {
[3+ 5l
[3+2]
t8l l6]
t3l t3l
','r::. (^) i,.:.:._,.. (^) ... (^) .,_l:.:,:. " ..:,::.
Examination Control^ Division
Exam. Level Programme
Full 80 32 Year / Part 3 hrs.
Pass Marks Time
/ (^) Candidates are required (^) to give their answers in their own vvords as (^) far as practicable. / (^) Aaempt All queslions. '/ The^ figures in^ the^ margin^ indtcate^ Full^ Morks. / (^) Assume suitable data if necessary.
machine-type (e.g., lathe, grinder) if he has one of several skills. but each skill is
maintained by a mechanic).
*,orks (grnplogg:nAme, company-name, salary)
m anages (employee-name, manager-name) a) Write SQL queries^ for^ the^ following^ needs. i) Modiff the^ database so^ lhat^ Jones^ now lives^ in city Pokhara. ii) Give all employees of 'NABIL Bank' a 10 percent raise.
greater (^) than 100,000.
b) Ihe relation works^ has^ attribute^ company-name, company-name^ is^ primary key in relation company. How the relation betra'een these two relations is preserved? Explain
.
13+z)
r (^) 1: i.i. .r (^). - (^). i (^)!
Year/Part m/tr Time 3 hrs.
'2.
{ (^) Candidates are required to give their answers in their own words as far as practicable... { (^) AttemptAll questions. r' (^) fn"iSr6 i" the margin indicate Full Marlcs. { (^) Asstrme suitable data ifnecessry.
cardinality and degree of a relationship?
company(gqrnpg454grng city) manqgss(mpr-talne- (^) managemame) Forthe case ofabove database schema: L Write an (^) expression in SQL to cr€ate the table employee.
. erylhlnes.u{o^ dooot^ work.for^ X:Y.?h;tt*,^
. i'^ I^ ',ff."ffi,ftte^ an^ er(pidsrioh Rsladional^ Algebra^ to^ find^ the^ coupmy nanre,fflifiiiis^ the
enhance (^) the security by implementrng (^) concept ofviews on the database?
ttl
r When^ database de-normalization^ is^ preferred?^ l2+3+l] 6, Explainttre^ process^ of^ query^ optimization.^ What^ is.cost-based^ optimization?^
' (^) '[6+2]
!= What do you^ mean by ordered inde;r and hash index? Explain limitation of static hashing. How extendable hashing overcom-e such limitation? (^) L2+2+
'iri:1 .,': ri .,
' ,, g,^ a)^ Explain^ conflict^ serializability^ with^ example.
' U)^ Differentiate^ between^ fine^ granularity and^ coarse^ granularity^ locking^ in^ multiple ,,1 (^) , granularitylockingprotocol. , "i,, 9 Explain redo phase and^ undo^ phase^ of^ log^ based^ failure^ recovery mechanism. ,1.i. 10.^ a)^ What is object-oriented^ databases?^ Explain^ briefly. ..;. b)^ Explain^ the^ benefit^ of parallel^ database?
l4l
.: , (^) tl;.