Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
191 views25 pages

Dbms Super Important Questions

notes

Uploaded by

prateekpy91
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
191 views25 pages

Dbms Super Important Questions

notes

Uploaded by

prateekpy91
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 25
/ ae te DBMS Cigcss2) ee Sober Deport ant Qu es t8o 4 Mocute —) [Bien oe meee op ny | POMS fproaod fo Manes) te Cts ae vend. das. : es ‘ ahare Management Sesh ove, Pele Processing. C&-le Mower) 2 Brekhly epptadn dt. dheradute tia 9} 2-Desene Dens? Ex an dae) He Chana dentstig © doctebose approach « Hew do Bens “from tradtSora) ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner Po Wt ; : R oe ans Oy Pabolvone a | rahe on te Beret BO ce neiky) [Ee adensetenainn dotabose CertG ete Hi NO wey ~ Ze ok pe e - wee ° Ser X \ * Ce ) = ten Shanta example Crome) EN estates om AAffns Myhe dtoere [ETS i ESD uses? Deus achtvtites each oe I : Morb) cf 4 9 > os | |9- 6 bohak % data fadcberdence % Explor — i de fous Ayre 4 data Und ePerdence — : : CS Marker) — |eDayne we faucet Eee Wes ‘ |} ee O Deron: oi W)Sremna Conadrar — | Same t)Domsg : ey : i eh ce of thienk Eaitty POT sactfon |e PyaFems careles ‘ Mere Doka ee VY) Snapshot xv) Esty = A)Volve Sea Ny Rvoqrem Deta on VO)Condtrelity Rofo y ~ 2 Se Ate -_ a A Decors nwo phete “Ao je COO CEN conkol -Ho 1 [ Qaononkers Orl=akon | pak ho oO Phase Roddy eenntyoe i te Con cuspanen corntvel Cts Rtn) L er Lon Fn ™ exes bla aqgnenate 4 ton. Squ. mumoand -FS Expldie hoe oe to_add ? deep Onthsin os 7 ale aston vo a x Go Maxl2s) | Fela na) She oiet oho. oe re Excellence & Service ‘Scanned with CamScanner Kutbabh Cramte Latrgy Teabtonal algebra Avotakfon » ce Maat) (Deas ue bore dakakybs AvaStale Fov abt bubs % Sat (& Arona) . 7 aa Schama f)Redatfon Stebe F17) Relotfon FE) Domazty tv) Ratty N42 Ditens the varkouy Apes “4 fern Shoratta| Gefin evap s Why f theta oir 2e- Deine forekgn Key » Explain oll porte. Shttons brat can be thedfred wher referatta) Cakgeihy combat tVelabel negthy eyes bt. Explain Uth ecamples, He haste convent tne® Can ‘ro 3 peck ed and Gedy hens taba 8 created ty SEL 2 CoCmady 22.Dtseus Matton sdeletton 2 remade hia bea, anomalies, . Ld 9 < 4 s 4 Explets Ge ey g oo is ean ad ‘Scanned with CamScanner lo» DPscuns eyfoin 4 mahual go? wih Wey Nyy } iy | 5 ee Excellence & Service ‘Scanned with CamScanner y refereeing the following Database schema. (©) Employee(Fname, Minit, name, SSN, Bdate, Address, Sex, Salary, Sup_SSN,Dno) [Department(Dname, Dnumber, Mer_SSN, Mer_Start_date) [Dept_Locations( Dnumber, Ilocation) Project( Pname, Pnumber, Plocation, Dnum) |Works_On( Essn, Pno, Hours) [Dependent ( Dependent_Name, Sex, Bdate, Relationship) Write the relational algebra expressions for the following queries i) Retrieve all the employee names who are working for department number 5. ii) Retrieve all the projects which are controlled by department number 4. iii) Retrieve the names of employees who have no dependents. iv) Retrieve all the Employee Name who is working on all the projects in which John Smith} works on. 'v) Retrieve all the project numbers along with number of employee working on cach project Scanned with CamScanner ‘onsider the following COMPANY database 10M EMP(Name,SSN,Salary,SuperSSN,Gender,Dno) DEPT(DNum,Dname,MgrSSN,Dno) DEPT_LOC(Dnum, location) DEPENDENT(ESSN,Dep_name,Sex) WORKS_ON(ESSN,Pno,Hours) PROJECT(Pname,Pnumber,Plocation,Dnum) rite the relational algebra queries for the following (i)Retrieve the name, address, salary of employees who work for the Research lepartment. (ii) find the names of employees who work on all projects controlled by department umber4. liii) Retrieve the SSN of all employees who either in department no :4 or directly] supervise an employee who work in department number :4 (iv) Retrieve the names of employees who have no dependents (v) Retrieve each department number, the number of employees in the department and ©) Q3 heir average salary. Scanned with CamScanner (c) Consider the following relation schema Works(Pname,Cname,salary) Lives(Pname,Street,City) located_in (Cname, city) Manager(Pname,Mgrname) Write the SQL queries for the following li) Find the names of all persons who live in the city Bangalore. ii) Retrieve the names of all person of "Infosys" whose salary is between Rs .50000 iiii)Find the names of all persons who lives and work in the same city iiv)List the names of the people who work for “Tech M” along with the cities they live in, v)Find the average salary of “Infosys” persons 10M Scanned with CamScanner Way an cupwwyce wins Ul UG UL MULE PLUycuLs (iv) Anemployee has dependents (v) A department controls the projects C (08 Marks) : a Modu! : é What is meant by Integrity Constriant?“Explain the importance of referential integrity constraint. How referential integrity constraint is implemenited in SQL. (08 Marks) Write the relational: algebra operations t to perform the following queries: (i) Retrieve the name and address of all em loyees who work for the “Accounts” department. (ii) Retrieve the names of, emp (iii) \Firid the names of employees who work on Vall the projects controlled by department g humber 2. (06 Marks) Scanned with CamScanner 2. Any revealing of Important Note : 1. On completing yi gOR jational mapping. algorithm with suitable example for each step. (10 Marks) y o b. Write the SQL queries for the following database schema: Student (USN, NAME, BRANCH, PERCENTAGE) Faculty (FID, FNAME, DEPARTMENT, DESIGNATION, SALARY) Course (CID, CNAME, FID) Enroll (CID, USN, GRADE) (i) Retrieve the names of all students enrolled for the course ‘CS_54” (ii) List all the‘departments having an average salary of the faculties above Rs.10,000. (iii) List the names of the students enrolled for the course’CS_51’ and having ‘B’ grade. ab . (06 Marks) Scanned with CamScanner 131. On completing your answers, compulsorily draw dia 2. Any reveoling of identification, appeal to evaluator a: c. Given the Halong eheine 5 ee ~ a ° . ¢,, SSN , Bdate, adareiby gender salary’ suiperSSN , Dno) dept (Dnameg amber, MgrsSA jatigrstartdate) a? dept_loc (Dnumber , Dloc) & * ¢ project ( Pnaihe, Pnumber, PlocsDnuim) works.ou (ESSN, Pno , hows) i? it (ESSN , depen es name, gender , pate, relationship) i sssion for the, 2 fa) Ilswing : Retrieve the name'ofthe manager of gavhfdepartment. For each project, fetrieve the projet, number , project name and number of employee emp (fname, Li Scanned with CamScanner c. Given the following schema Emp (Fname, Lname , SSN , bdate , address, gender, sal dept (dname , dnumber, mgrSSN , mgrstartdate) & dept_loc (dnumber, dloc) project (Pname, Pnumber, Ploc , dnum) f. works_on {ESSN, Pno, hours) ~ a” dependent (ESSN , dependent_name, gender; Give the relation algebra expression ‘ore i) ii) iii) iv) ’) "0 wa a 2 ‘date, relationship) lowing : Retrieve the name and address, sof all"émployees who work for ‘Sorts’ department. Retrieve each department nympberynumber of employers.and their average salary. nd department manager’s last List the project number, controlling department number fi name , address and birthd: Saad Retrieve the name of e1 yees With 2 or more dependents. ~ List female employeesdrom dno = 20 earning more than 50000. (10 Marks) CO & Scanned with CamScanner c. Given the schema‘: Passenger (pid, pname, pgender, pcity) Agency (aid, anme, acity) Flight (fid, fdate, time, src, dest) Booking (pid, aid, fid, fate) Give relation algebra expression for the following : i) Get the complete details ofall flights to new Delhi ii) Find only the flight numbers for passenger with paid 123 for flights to Chennai before 06/1 1/2020 iii) Find the passenger names for those who do not have any bookings in any flights _ iv) Get the details of flights that are scheduled on both dates 01/12/2020 and 02/12/2020 at a 16:00 hours v) Find the details of all male passengers who are associated with jet agency. (10 Marks) Scanned with CamScanner Write SQL query for the following database scheme : Employee(employee_name, street, cily) Works (employee_name, company_name, salary) , Company(company_name, city) Manages(employec_name, manager_name) ‘: i) Find the names, street address, and cities of residence for all employees who work for ‘First Bank Corporation’ and earn more than $10,000 . ii) Find the names of all employees in the database who do not work for ‘Firs Corporation’. Assume that all people work for exactly one company iii) Find the names of all employees in the database who eam more that every employee of ‘Small Bank Corporation’. Assume that all people work for at most one company iv) Find the name of the company that has the smallest payroll y) Find the names of all employees in the database who live in the same cities and on the same streets as do their managers, (10 Marks) Bank * Scanned with CamScanner ARS aaa 8 Bo Lin rate % Explase = Avante, Gengle —trer % boar Etes QL, Explore = ? = en SOL woth Exe Showed roosting aS [ac oa aad Soto Ye DRC dvives Excellence & Serie Leon ‘Scanned with CamScanner Ss Hew to Creake View Pn Sa? Eriplan Lets exomble (6 Maverd G.Lthes GB SeLT% How MU & Athlon §rom THR 2 (GU rons QeWher & CHT Q Why toy CAL tnhrvdoady Whar ou the ASsadvarbages O 2 AdFtechon 96 COR cnt pee Cg rosea) Brlohad 8 dunande SALB How Mt & Mount from embedded zane len : ae) As Explain tre Eammands UR e6% T)DRoe command *K)Ddeke command TH) Trek command &V) Opdate Command ) Piter command Cro Moats) Los blows @% a Veen ereated + dvolped & DShak or Lhe frollera arsockaked ust Ubaarmoa S Views Cro Mores S CkvrGles to Quesdba S— COBLUE Ex de Follousrg, ‘ Derabaded Seu R\Patabase SVE Grocediore Cro Morr) 2 ‘Scanned with CamScanner pan Pl ap we Ce ntorks Row does SAL allots @mblem So. ‘ i p-qenwal Rotegot, commas 9 Moo Ex xs Leth ex A Comsealle Co- related Nerved Warrer & jatsmeake C3 “eet ommuricarborn vanfablis C3 ces a} sevice ‘Scanned with CamScanner Vo. dye ne ?) Aggregate function 8) Frtgqen ; nee Poe up dabablting tv) Crowes Group ey £ hav? V br Korma VP) Towa SenPpia o Ear fon Server Ce-8 ae Module 4 4 cluue Geataimctes: le Explain Informal dertan Qurdelurr Lov relational desta 4&chema. G =) De pShake the Meed der Naw “9 Ekblaiy AmP, IN 2 owe wep en? Ce reas 2 Wher dow You Biker by athfhute Closime 2 6fve an ad Ce menses) ‘Scanned with CamScanner STS SS PAA NN ANOAANAKRAKNANM AANA A Na wi Comtey alved depend nee Exptam Atfboank saps he RESY Bnomalie T Wha domale Key Teme) Forme DER?) Kroon = Ulitmare NES Me ene Ccblar deloend , Exiblotn oat tits elon dencr4. 3 EET | 23 Excellence & Service —~ ‘Scanned with CamScanner 12. Explain any 2. measure employed how evelattonal fchema destan (te Aleat 4) I. Lvthe agente to ffrd chotum % Se BS BY C& Markay Mes Dapne non- addébive Joon property m4 de CompasPifon 2 usvite an ovPthen Bon Lestty = mon additive {ota re Roadmap ry DRM CKariys —— ‘Scanned with CamScanner

You might also like