You are on page 1of 11
appeal to evaluator and /or equations written eg. your answers, compulsorily draw CECSS Cn ENE usw [ | | | | 170883 Fifth Semester B.E. Degree Examination, Dec.2019/Jan.2020 Database Management System Time: 3 hrs. Max. Marks: 100 1 Note: Answer any FIVE full questions, choosing ONE full question from each module. Module-t a. Compare DBMS and early file systems , bringing out the major advantages of the database approach. (06 Marks) b. With a neat block diagram, explain the architecture of a typical DBMS. (10 Marks) ¢. What are the responsibilities of the DBA and the database designers? (04 Marks) oR a. Define the following terms: i) Datamodel ii) Schema iii) Instance iv) Canned Transaction. __ (08 Marks) >. Draw an ER diagram to represent the Election Information System based on the following description In the Indian national election, a state is divided into a number of constituencies depending upon the population of the state. Several candidates contest elections in each constituency Candidates may be from some party or independent. The election information system must record the number of votes obtained by each candidate. The system also maintains the voter list and a voter normally belongs to a particular constituency ‘Note that the party details must also be taken care in the design. (12 Marks) Module-2 a. Define the following terms: i) Key ‘Super key Candidate key iv) Primary key v) Foreign key. (05 Marks) b. Enumerate the steps involved in converting the ER constructs to corresponding relational tables. (07 Marks) ¢. Considering the schema Sailors (sid , sname , rating , age) Boats (bid , bname color) Reserves (sid , bid , day) Write relational algebraic queries for the following : i) Find names of sailors who have reserved boat # 103. ii) Find names of sailors who have reserved a red boat, iii) Find names of sailors who have reserved a red or green boat. iv) Find names of sailors who have reserved alll boats. (08 Marks) OR a. Explain with examples , the basic constraints that can be specified when a database table is created in SQL. (12 Marks) e SQL queries for the following relational schema : TOMER (CID , CNAME , EMAIL , ADDR , PHONE) cl EM (ITEM_NO , ITEM_NAME , PRICE , BRAND) SALES (CID , ITEM_NO , # ITEMS , AMOUNT , SALE_DATE) SUPPLIER (SID , SNAME , SPHONE , SADDR) 17CS53 i) List the items purchased by customer ‘Prasanth’. ) Retrieve items supplied by all suppliers starting from 1" Jan 2019 to 30* Jan 2019. i) Get the details of customers whose total purchase of items worth more than 5000 rupees. iv) List total sales amount, total items , average sale amount of all items. v) Display customers who have not purchased any items. (08 Marks) Module-3 What are assertions and triggers in SQL? Write a SQL program to create an assertion to specify the constraint that the salary of an employee must not be greater than the salary of the department. The employee works for in the COMPANY database, (07 Marks) ».. Write a trigger in SQL to call a stored procedure INFORM_SUPERVISOR( ) whenever a new record is inserted or updated, check whether an employee's salary is greater than the salary of his or her direct supervisor in the COMPANY database. (07 Marks) How do you create a view in SQL? Give examples. Can you update a view table? If yes, how? If not, why not? Discuss. (06 Marks) OR With real world examples, explain the following : i) JDBC ii) Correlated queries iii) Stored Procedure iv) Schema change statements in SQL. (12 Marks) Write a complete high level language program (in Java or C) to display the rows of a customer table created in oracle having < custid , custname , balance > columns with embedded SQL. (08 Marks) Module-4 What are the problems caused by insertion , updation and deletion anomalies? Discuss with an example. (06 Marks) For the below given relation R (A, B, C, D, E) and its instance , check whether the FDs given hold or not. Give reasons. ) A>B_ ii) B>C ii) DE iv) CDE (04 Marks) A[B[CID[E a |b feld ter ai [be [orf di fer a | by | cr | da | es az | bs | ¢s | do | ex Using the minimal cover algorithm , find the minimal cover for the following FDs F={AB—C,A+D,BD>C,D—>BG, AEF). (10 Marks) oR Normalize the below relation upto 3NF : Module | Dept | Lecturer | Text M | bi| Li | M| DI | Li _| 12 m2 [pi | i [Tt m2 [pi ui [3 M3_[ DI | (2 | 14 M4_[p2 | 13 [1 M4_| D2 | 03 _| 5 [ous [p2 [4] T6 (10 Marks) 20f3 | 170853 b. Define Multi valued Dependency and Join Dependency. Explain 4NF and SNF with examples. (10 Marks) Module-5 9 a. Describe the database inconsistency problems : Lost update , dirty read and blind write. (06 Marks) b. With a neat diagram, explain the various states o (07 Marks) c. Check whether the below schedule is conflict serializable or not. {b2 , 12(X), bl .r1(X). WICK), ICY), WI(Y), W20X) el. el, €2, €2}. (07 Marks) oR 10. a, What is 2PL? Explain with an example. (06 Marks) b. How do you detect a deadlock during concurrent transaction execution? (06 Marks) c. Explain the various database recovery techniques, with examples. (08 Marks) 3of3 ‘oms Scheme and Solution cows’ } ni atabase Management System subject Code : 140553) Question Member Solution SS ee located the Ffollowi _ changea ane inc or poate ben ko the main Scheme. 1b> Diaqram a DOmS components — Doms interfaces dyed |) Geleck x TkenNo, ken Name, S-#T4ema fiom Customer cork DL, bale & 3 whee CCID: $'CED AND a. FEem-No = 6.Dben NO AND co: CName = 'Prasanth' } WD) Seteck Sid, Fbem- No from Supply ashore Supply- dake bebwee 3 ol JAN 1G AND 30-TAN~ wt) Select S CTD> gum(AmounT) From Fates S b Croup by FD How bum( Amount) > 5e0e 5 wv) gueck Sum(AmounT), count titer), | & fv (AmounT) tnorn Sole*) v) Select C&D From customer MEN 3 Sudeck Diskinck CLD 2 From = Sabeas “ APPROV Lhe -ovacctio Schere and Solution. Cc Feet Titte Database menk SyStemn Subject Code: 1755 | _ Maroge: y cy onan ae Solution Marks Number eel 0. [Aséention: gerenal Constraint - USer dePined| with @ name rok butlk-in Constraint crake Assertion Satany-Constracat CHECK (Not Exrs7Ts) (SELECT * FROM EPPLoyEE E , EmpLoy£e ™, DEPARTMENT T) wlhERE Ff: salary > *Salares AND = DNo AND £'DNO=D* D. mgxsen = m65n))5 ol o5 Trugg ur! a implement ackieons /n SAL Bt after Some event 5b. |Creake Bugger Salasy - Vlocation Before TrSent oR updake & Salary , Supwsen ON EmpLOY EE for each mow when (‘New Salary > + C Setect Salary From Employ ee | where S6n2e New: Supssn)) 5 IN FoR —SUPERUTSOR (New eSupen ssn, Neo 964) )s (ew) CDV S. nl Cheney bette) BaR-Chavdmar CS ISE Board. 2 of 3. © Visvesvaraya Technological Univery Ad un Belagavi, Karnataka - $90 018 i se D Scheme & Solution Sesh urffor See Subject Title : ode bank. Momasomtnd Subject Code: 17CS S3 Question ofan Marks Number Allocated la- Cdloy i. Dams , bat no fnck concapt tm erat ak da perdiomee oc D bab - he wm Dams, p arobdete ip bound n. fle Aythem.. fee tomate we eet pans, | t haw 7 oa ak dine harp tm darley SM Argltons AA vandeyn oF Dem > comb rated yedimdaney pecurty| 9 Lo raber . Mage at a, Lol P| ~ Ay ifack dk ap a Dams rntndiony] to b- = aL modnly & cahuyrw- . L Wantyuns yeReUrds credin , proredug “ font} apn xeks, Sotto near, | 7 tunes Of 28, 4 - 24a Drstene: Shame roth current pabe hte Tank Thomash: Parable sent “Hee Coad Forcing UPLNG TO » &- Bark TR Dot Subject Title = Subject Code: Marks Allocated Question = Number Gee) Solution Laviyrangt oa Pay a a Dobe of ) a ee ¥edtimdon yy (prgfer Pa. wdore are wed —— has (he eduvlaonay . Combidche Key seis on vy Mate o% piorary Mer: Forcyn key: Sef ee hase van 20° TOM other dash j sealed mth. ‘ Giilors ) eld Trane ( hetcna A / Ba. | kay. A St oh altrbutes Kak umigrely tentp penere drvedn plow Binney Haye Ove FE cackstehe Hep Ito JA adshion , bey) RE a Rl. soa GI Mame fy, , mts) PA Resend SS ? + < Temp DL Rerernn 4 Saclers Git) ‘Temp < Conde Nred! Bex) (Ensign! *P ) R «Subject Title : = |) Sede T hemo, E+ Thom—Nawme , $: Thoms FRom Currey ©, Them 1, Sales s WHERE 7 bed CCNA =! Present! : (i) Setect srp, Tene From surey i) SECT $-chp, Cum CAmouNT) from Cals £ yep crp ees Yous CAmouat) 7 SOS > From Sales; v) Sdeet CED from Cusbmey Minus Slack Distin Cp frm Sale, Tome rat bwilh-in Comite Crate Aceh alary — Constr ey D Gen Emenee M DEPARIM eRe. E salary 7M. Salam hd Bigger k tg “actions SQL Kher Ame Pain « tab frome /jored procedism. te hawdl the event . C-CIp = C. CED ped L- Tem w= S-Etim ny @ Were surpy—Debe Behwern of-TAM = 19 Ae 0 ~ WW) edeck Suen CRmouimh) , Count (4 Utms), Keg CAppmount) é. i yp Ayeecp — wyerd fined VO Se. Neseriion Lemuel coool snare Aspe Cue, CWT exisTS C SELECT Prom Empey 6G E i E ile = DDN» Ant D. Myr Shee ssw, Subject Code : Rumber Sohuiinn Allocated WW) TSED < (Mesa pag Revere) | mH, Ore Rie Tsxp od Sarles fo | Resnth Denome CR) — AR. | Nop mutt, UNIave , PRimary Key, forcian KeY,) CHE re 7 a — Subject Title = Question Subject Code : Number CReer TRIGGER Solution Marks Allocated SPRY VIOLA TOA FR ey ow lisform_ Cupeey’ Cc. Minos ee cs Bemre INSERT OR UPDME OF SALARY, SUPERSSH on EmpoyEe SECT SPtaky Fam EMP vece 7 CREATE View 4 Nes Rite 7 Witen ( New - SMAKy 7 wer & 65m 2 New . Supesn) ) 190k (NEW SUPERSS IC, NEW ys _ Aachion poeeitle, zhi, He.) C gt i aN? | | ™~ 64.| Spec: TB impastame Gomrdale_ foons Tyet > Ter, Types, Be t Awiers Canter remy Ltermbed jor Mier . Where g.Srame FROM Carls $ seuat g.Std EXISTS( SELECT ¥ FROM Reser Stond frocdune: e/a P ~ : oe Gahban pereer garnered Qyive meeaagls «dee peered wane <=) i nectrn Con x DviverManager- nechin( | 8 Connect Dy e pico Leibeddad 880 Shed ( where R-bid = (03 Pad 55td= SH). ogra Srenbed ( presenpitel) ct omcle* Re Subject Title : Subject Code : Sumber Solution ans, ta-| all bre 4pper of anomelc WA Leaps Z b.| (iy detsnct A&A (tuple > ) di) & Ahspred (re cheese of C tor or Gt) oes net held ¢ Bay chamged ) + CY) gahepied ( same aly) C7 ppgng tke al.grntten , om ge) G = Spec, Amd, DOC, DPB,D2G, |), hE Nec roe Me 6 = § nee D, Dold? Br DISIMEFT (of a De: Ba | kay 2 { Module , Text } “FMedale, Teck > Qlactang Dept Medate. — Slacker dept} Petr FS (Mode, Text and mb Cdn ee) vat LZ nok te BNE » ube ‘ . b.| edu er a ee ee rect 2 Ai fret 4328) » Skhe

You might also like