Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
32 views
7 pages
DBMS Practice Test-2
Uploaded by
iritikdev
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
Download
Save
Save DBMS Practice Test-2 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
32 views
7 pages
DBMS Practice Test-2
Uploaded by
iritikdev
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
Carousel Previous
Carousel Next
Download
Save
Save DBMS Practice Test-2 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save DBMS Practice Test-2 For Later
You are on page 1
/ 7
Search
Fullscreen
Consider the tvo funtionl dependeney st F and G, such that [A= BB C.C— AjandG= [A BCA AC. AB— C.BC— A} Which ofthe following iste? Here accontng to FD set F: A= {ABC}, B"= {ABC} and €°~ {ABC} While according ro FD se of G AT (ABC). B= {B.C So, FeoversG but G doesn't cover F Hence, option A is comet, taney th me llonncghen bow Employee [Deparment | F_Allowance Ram ‘Mechanical [5000 Sta Electrical 2000 Rea Computer 3000) Sind civil 1500 Wate coal Delong ae SELECT COUNT(*) ffom(SELECT Employee, Department fom Allowance) a5 S ‘NATURAL JOIN(SELECT Department, F_Allowance fiom Allowance) as 7}: an oe wl bpd ter apiyng NATURAL ON. Terre sownby COUNT acon wrest oe: ed Inthe sventabie meneame ohare 3 avery writen ‘hen ioe "port one an nacre ca it rescind UnRodent once name sng mer ting stig ge tg lane! tng, ects tg ene) ftrotenon: ge crane Fretyimeger naman. Sette) ‘Thecatptethe along ey SELECT DISTINCT S sanme FROM Student S WHERE S satan IN (SELECT san FROM Favolled Fi, Faolled E2, Class C1, Cass C2 WHERE E1 snum=E2 saum AND El.euame > E2.ename AND El.ename= Cl.name AND E2.caamne= C2.nane AND CClumest t =C2 mest at) © tweens tates uns accede ce Mate ese me Comet opon ‘he qryrtrste mes ofalthe stent cadres that met athena te Let Students relation nraled Tone —[mecsot a a0 @ 300 que. Se. ame ei For the following elation sehen cmloveelemlovee-nan,sret. ctv)‘wotks(emplojee-name, company-aaine salary) ‘compauy(company-nae ity) smanageslemployee-ame, manager-ame) Then the output of the following query select employee-name from works t where salay >(seletavaisalay) from works ‘where company-name = seompany-ame) Nota: Assume tha all people work for at most one compan: © Hier stallemsoe wher sthnthemenesy et ae hemp heme the employee hot het sry the cmpany © _Testtersmesctatempioes whe con nortan erent tempest compan. ‘one opion ‘ues ames englyes osama reese fallenplest the cna Let Work Relation: fam 1 25000 fies 1 oan ari = aca Mahesk Infos 23000 ‘Sharh cS 5000 ‘Company Relation: es hyderabad select employee-name from works t where salary “(eet avg(calary) from works 5 where ‘teompany-name ~scompany-namie) toner query returns eSB) 2000 2000 a8 tent es Consider the fllowing elatonal schema Supplieraidntezer,soamesting,ciystrng, street ring) Parsipidinteges. poame string, coloring) (Ctalogsidintessh pidinteper, costreal) Consider the following SQL query: SELECT S.aame FROM Supplier WHERE Sid NOTIN ( SELECT Cs FROM Catalog C WHERE C pid NOT IN ( SELECT Pp WHERE Peolor <> “Blue” )) ‘Assume thot relations comesponding to above schema are not empty. Which of the following isthe correct interpretation ofthe above query? res erates ue nae sapped ann shpat© Hehe roe asm vse non Beans ‘Consider the slation be: Supplier + sia | name 3 we sia | pia 21 | Green 2 | Ble First twill execute inner query s, in elation Pass: Selact Pid fom pasts P where Peolor is not equal to Blve “Than in telaton Catalog: Select Csi fom catalog C where C pid NOT IN (20,21) At asin elation Suppliers: Selet S.name from suppliers S where S sid NOT IN (3) Hence, we will get“Abe" and Def" isthe output (As we can 260, Supplier “nya” supplies both Gres aad Blue color pans, But the query say thar selet only those suppliers who only sells aon-Blve pants, which are “Abo” and Del ee SELECT student i, stodent_name FROM studeat WHERE birt_year “= ALL(SELECT birh_yea fom student) yt sane ty ave gery? © “testo ad ans as ee © Pretest andnaneso ead sts oe comet opion un tetove ry i rh na ur where wc th yaa tents nga he Lars boreatn kconmethefotloingtfetors tte mh eat stdentscrng mat n thc et Rollo | Marks 101 » 102 38 103 9 101 n 102 66 103 56 101 a 102 86 103 36 ‘What would the below query rerun SELECT Roll No, MAX(Marke) AS Hiahest masks FROM stent sans WHERE auaks-(SELECT MAX(Macks) FROM student marks} © tet tata tt pat ca © wettest srt ements Comet option -sthe ney rr tips scrim te ver qey nts dealt anak othe ie or desman once these sen)uhehine nore thothtotheep aera sini mong aero ea osm ts a nasrt coda med “he090Psatemet emote ober the sabre lone hora pce tate ones BRP De nd TUNGHTE ae aprtoft ss einton Larges hey mn oe retarted ‘Thenerednwecmet nani he BRO stent bere DOL ontop ere le (es Findheeqaent ean gsr xeon forthe ren Le Fron racic @ 17a F€ Faculty (3C € Class (Fid ~ C Instructor id AND C.year= 2020 AND ‘oret option | ‘Tanme ~Faame AND Terseode = C.rscode)))© 1 aFe Facaky (HC € Class (Fid~ Castner id AND Cyear= 2020 AND TTaane = Fannie AND Terseode~ Ceroode) © 1 vr Facey aC € Clas (Fid= Cusco jd AND Cyetr= 2020 AND ‘Taare = Fanme AND Terseode=C.rcode)} ‘query bite ntomat asus rage aupdiceannc andthe dawson nrc ger ‘verona gsc em rego hing oer. oat ‘Thentow many auesorcneiedtaberpiucd uring sein ore Ce Basie SQL clause Selet [stint] al.92.a3..an from rl... ver condition } [group byatibutes] [having condition order by (tributes) [dese] Execution onder From where = group by > having ~ seeet > distinct => oder by Cases hic ue rplaced in exsouion order ac: elect ad distinc from starting to st soansweris2. Like Amma ehahts” ESCAPE? © Altssngs oeeianing with Aran sat™ © Avesingsbesianng with “Arabia” “Arnab ®ichah®s' ESCAPE", matches all the stings beginning with “ArzabYchah™ © Allowing beginning with “Arma sha” os, sob Consider the fllowing eatons ACTOR (id fase, lname, gender) MOVIE (i nme, year, rk) DIRECTOR (i, fname name) CAST (pid, mid, ole) MOVIE_DIRECTOR (i, mid) id column in ACTOR, MOVIE & DIRECTOR tables ea ey forthe respective table (CAST refers to ACTOR id, CAST mid refers to MOVI -MOVIE_DIRECTOR i sefers to DIRECTOR id and MOVIE_DIRECTOR mi refs to MOVIEId ‘Thea the ouput ofthe ouput ofthe following SQL Query i select distint ad, afaame loam fou Directors , Movie_Directorsb, Movie ¢ Where aid = b did and ‘bald = ed and Me year%64 = 0and c year % 100 0) or ‘over 4000)© thant cee ded tata yr © eta tte eee inte a Comet open ‘Theory lets th dames ofthe ests cts thea ee Ferhat i pects iho eect? © eterna Taam ber ftp 20 mh oN FAEE reer starminnnon reanimation rina ues arenrn ad inn unter tein ont opon ‘eget en te aro ating ens at as, wl yee Carson prod) ane inna amber mw rsa ‘amon teens and ey consransaretaen io conse © erento tees ‘Tennant ecient nine wt © chr tesmenmintcdmrnd teenie readme aa Fethteetesemenmberocsume sede corespnin alums terme andthe sane oma nied eh °e thermionic ° ‘cn tooth ranma thesauri, sndcoremendiglemrmurtavth en,
You might also like
Maulidya Yunanda Practice Sec 3 4
PDF
No ratings yet
Maulidya Yunanda Practice Sec 3 4
20 pages
DBMS Lecture05
PDF
No ratings yet
DBMS Lecture05
63 pages
Week 5 - SQL - Select
PDF
No ratings yet
Week 5 - SQL - Select
22 pages
Lab Mid Spring 2024 Solution
PDF
No ratings yet
Lab Mid Spring 2024 Solution
8 pages
CS302-Class-Slides-Set-7-Unit-2-SQL - (Part 2)
PDF
No ratings yet
CS302-Class-Slides-Set-7-Unit-2-SQL - (Part 2)
7 pages
ORDER BY CLAUSE - Notes Lyst6649
PDF
No ratings yet
ORDER BY CLAUSE - Notes Lyst6649
5 pages
Week 9 Dbms
PDF
No ratings yet
Week 9 Dbms
19 pages
Oracle SQL
PDF
0% (1)
Oracle SQL
46 pages
DBMS Lab 07 04112020 012905pm
PDF
No ratings yet
DBMS Lab 07 04112020 012905pm
6 pages
DBMS Lecture05
PDF
No ratings yet
DBMS Lecture05
61 pages
SQL 5
PDF
No ratings yet
SQL 5
14 pages
SQL Quiz
PDF
100% (1)
SQL Quiz
38 pages
Er. Pradip Kharbuja
PDF
No ratings yet
Er. Pradip Kharbuja
33 pages
SQL Zero To Hero
PDF
No ratings yet
SQL Zero To Hero
14 pages
SQL Queries Practice
PDF
100% (1)
SQL Queries Practice
8 pages
Practical Sheet 02
PDF
No ratings yet
Practical Sheet 02
18 pages
05-CMP320-CH6 Aus (1) 2
PDF
No ratings yet
05-CMP320-CH6 Aus (1) 2
27 pages
DocScanner Oct 29, 2023 5-45 PM
PDF
No ratings yet
DocScanner Oct 29, 2023 5-45 PM
9 pages
Oracle
PDF
No ratings yet
Oracle
99 pages
10 Frequently Asked SQL ... View Questions - PDF
PDF
No ratings yet
10 Frequently Asked SQL ... View Questions - PDF
3 pages
Tutorial 2 & 3 Update
PDF
No ratings yet
Tutorial 2 & 3 Update
29 pages
Top 50 SQL Questions
PDF
No ratings yet
Top 50 SQL Questions
15 pages
SQL Cheat Sheet
PDF
No ratings yet
SQL Cheat Sheet
4 pages
C12 Cs GroupJoin Assignment
PDF
No ratings yet
C12 Cs GroupJoin Assignment
8 pages
Assignment 3 Solution
PDF
No ratings yet
Assignment 3 Solution
6 pages
Extra Queries
PDF
No ratings yet
Extra Queries
17 pages
Exercises: 4.1 Answer: A
PDF
No ratings yet
Exercises: 4.1 Answer: A
7 pages
Module 4.0
PDF
No ratings yet
Module 4.0
64 pages
SQL Query-1
PDF
No ratings yet
SQL Query-1
4 pages
SQL Interview Questions Sheet
PDF
No ratings yet
SQL Interview Questions Sheet
16 pages
Week 6
PDF
No ratings yet
Week 6
29 pages
Dbms Lab
PDF
No ratings yet
Dbms Lab
52 pages
Top 40 SQL Query Interview Questions and Answers For Practice
PDF
No ratings yet
Top 40 SQL Query Interview Questions and Answers For Practice
18 pages
100 SQL Questions With Real Examples-2
PDF
100% (1)
100 SQL Questions With Real Examples-2
16 pages
Select FROM Emp : 4.1.retrieving Information From A Table
PDF
No ratings yet
Select FROM Emp : 4.1.retrieving Information From A Table
6 pages
chp04 05 More SQL
PDF
No ratings yet
chp04 05 More SQL
23 pages
SQL Question 2
PDF
No ratings yet
SQL Question 2
4 pages
Computer Practicle File
PDF
No ratings yet
Computer Practicle File
21 pages
SQL
PDF
No ratings yet
SQL
4 pages
DBMS Final Paper
PDF
No ratings yet
DBMS Final Paper
5 pages
Books Isbn - N o Title Publisher - I D Year
PDF
No ratings yet
Books Isbn - N o Title Publisher - I D Year
29 pages
Interview Questions
PDF
No ratings yet
Interview Questions
6 pages
SQL User Stories
PDF
No ratings yet
SQL User Stories
6 pages
SQL Info
PDF
No ratings yet
SQL Info
12 pages
Introduction To Oracle SQL
PDF
No ratings yet
Introduction To Oracle SQL
94 pages
Set Operators: 1. Union
PDF
No ratings yet
Set Operators: 1. Union
9 pages
K L University Department of Computer Science & Engineering II/IV B.Tech Semester II Database Management Systems (13CS204) TEST-2 Key
PDF
No ratings yet
K L University Department of Computer Science & Engineering II/IV B.Tech Semester II Database Management Systems (13CS204) TEST-2 Key
8 pages
K L University Department of Computer Science & Engineering II/IV B.Tech Semester II Database Management Systems (13CS204) TEST-2 Key
PDF
No ratings yet
K L University Department of Computer Science & Engineering II/IV B.Tech Semester II Database Management Systems (13CS204) TEST-2 Key
8 pages
DBMS-Question Paper (Set-1)
PDF
No ratings yet
DBMS-Question Paper (Set-1)
4 pages
SQL Server Interview and Practice Questions
PDF
No ratings yet
SQL Server Interview and Practice Questions
16 pages
SQL 1 (Basic)
PDF
No ratings yet
SQL 1 (Basic)
41 pages
SQL Part 1: Kal@ittelkom - Ac.id
PDF
No ratings yet
SQL Part 1: Kal@ittelkom - Ac.id
41 pages
10 - SQL 11-04, 11-06-2024
PDF
No ratings yet
10 - SQL 11-04, 11-06-2024
33 pages
Data Manipulation Language
PDF
No ratings yet
Data Manipulation Language
48 pages
Syllabus
PDF
No ratings yet
Syllabus
3 pages
Lab 05
PDF
No ratings yet
Lab 05
4 pages
La1 Part2
PDF
No ratings yet
La1 Part2
2 pages
LA1
PDF
No ratings yet
LA1
3 pages
Learning Outcomes
PDF
No ratings yet
Learning Outcomes
6 pages