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)
36 views
4 pages
DNA Quiz 3
Uploaded by
Ramandeep Singh
AI-enhanced title
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 DNA quiz 3 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
36 views
4 pages
DNA Quiz 3
Uploaded by
Ramandeep Singh
AI-enhanced title
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 DNA quiz 3 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save DNA quiz 3 For Later
You are on page 1
/ 4
Search
Fullscreen
p ter a 2s CS4.301: Data and Applications (Monsoon 2022) fe Quiz -3 Name: Rowardn? Siege Time: 45 minutes Roll No, 2o2\10'0Se Maximum Marks: 20 QL. Let us consider a Twitter-like setting, with the following specifications. + Users post ‘tweets’, that is short pieces of text. + They may tag their tweets with zero or more tags of their own choice. For example, a user tweeting about Apple's ‘Far Out’ event may decide to use the tag "FarOut’ (prefixed by a ‘sharp’ sign: #FarOut, if we follow the convention by the twitter site). + Auser ’u' may follow zero or more other users, which means that their ‘tweets’ are visible to user 'u’ when he/she logs in. For the above setting, we will use the following schema: + Person (uname, city, street) - Assume the uname is unique. + Follows (uname1, uname2) - Person unamet follows person uname2 + Tweets (tid, ttext) - Tweet with tid has text ttext * PersonTweets (uname, tid, ts) - Person uname posted tweet tid at timestamp ts + TweetTag (tid, tagname) - Tweet tid had tagname in its list of tags. We now want to extract some information from the database. For each of the following questions, give the corresponding SQL query. i. Find all the people (uname) who posted a tweet with tag ‘MODI’. [2 marks] SELECTS UMdyene Fran ene Boum ASF, Teitag oh WT WWMER, —-Teagntiny = 100" YO ii, Find all the different, distinct tags ever used. [2 marks} Stuer * pigmer Joga oO FRM srwetceg -atgggeione Lo Scanned with CamScanneriii, Find all the tags ‘Rahul Gandhi’ ses in his tweets, (i.e, Rahul Gandhi's tweeting interests) [2 marks] Steer“ uname . togrosme FRom Grier as 2 pip TUtTOG OL TT He BoA uname + Sealusgandhi” 'v. Find all the people (uname) whose reading and tweeting interests do not intersect, ie, who do not read the tags they write about. [4 marks] Seer name Rom poston ORE TwHEAs OT | euuerag ak Tr WHERE WUE tee, fs sre tagnawne // Eee ey Trragname h ¥- Bonus: Find all pairs of people (uname) with atleast one follower in common, [2 marks] SELECT uname | rare PROM Resim AS Pp wm Forrws aK K wag Runome witeh follow’ ananua a AND were G wnarene Fotos Unanacz “ Scanned with CamScannerQR. Consider a relation R(K, A, B, FK1, FK2) that satisfies al integrity constraints, where K is the key of R, foreign keys PK1 and FK2 refer to primary key K, the domain of attributes A and B are integer values {1, 2, 3, 4, 5} or NULL. For the following parts, select all options that are correct. Part A [2 marks] Which of the following queries can give more rows in the result compared to the following query result? “SELECT * FROM R WHERE K=12: Note: 123 is a value taken from the domain of values of the key attribute K. (at SELECT DISTINCT R2.K, R2.A, R2.B, R2.FK1, R2.FK2 FROM R AS Ri, R2; b, SELECT * FROM R WHERE KIS NULL; \er SELECT * FROM R WHERE PKI IS NULL and FK2 1S NULL; dC SELECT DISTINCT RLK, RLA, RLB, RLFK1, RLPK2 FROM RAS R1, R2 © WHERE R1.A=R2.A; Part B [2 marks] Which of the following queries give the same result? Note: At least two queries give the same result, a. SELECT* FROM R WHERE A=1 AND KIN (SELECT K FROM R. WHERE B=1 AND FK1 IN (SELECT FK1 FROM R WHERE K IS NULL yi b, SELECT * FROM R WHERE FK1 IS NULL; sc SELECT * FROM R WHERE A=NULL AND A=2; La’ SELECT * FROM R AS R4, R2 WHERE R1LK=R2.K AND R2.K
You might also like
Advanced DBMS 2023
PDF
No ratings yet
Advanced DBMS 2023
49 pages
D.A.V. Public Schools CG Zone SAMPLE PAPER 3 2023-24 Class: XII Time: 3 Hrs. Subject: INFORMATICS PRACTICES (065) Max. Marks: 70
PDF
No ratings yet
D.A.V. Public Schools CG Zone SAMPLE PAPER 3 2023-24 Class: XII Time: 3 Hrs. Subject: INFORMATICS PRACTICES (065) Max. Marks: 70
8 pages
FU-HCM Introduction To Databases: You Are Here
PDF
No ratings yet
FU-HCM Introduction To Databases: You Are Here
16 pages
TM351-Fall2018-Mock-MTA-QA-01-r-01.pdf (New One)
PDF
100% (1)
TM351-Fall2018-Mock-MTA-QA-01-r-01.pdf (New One)
7 pages
Assignment 1 DBMS JUL 2022
PDF
100% (1)
Assignment 1 DBMS JUL 2022
11 pages
Assignment 3 NPTEL DBMS January 2024
PDF
No ratings yet
Assignment 3 NPTEL DBMS January 2024
10 pages
Dbms Gate
PDF
No ratings yet
Dbms Gate
43 pages
GATE CSE by Kanodia Part3of4 PDF
PDF
0% (1)
GATE CSE by Kanodia Part3of4 PDF
264 pages
Dbms Question Bank
PDF
100% (1)
Dbms Question Bank
28 pages
Query Language 03 - Class Notes
PDF
No ratings yet
Query Language 03 - Class Notes
116 pages
Assignment 2
PDF
No ratings yet
Assignment 2
2 pages
All Exams
PDF
No ratings yet
All Exams
74 pages
Sample Paper 1 7
PDF
No ratings yet
Sample Paper 1 7
7 pages
∏ (Σ (P×R) ) −∏ (Σ (Q×R) ) 2. Q: R⋈ (Σ (S) ) : Σ (R⋈S) B) Σ (Rlojs) Rloj (Σ (S) ) D) Σ (R) Lojs
PDF
No ratings yet
∏ (Σ (P×R) ) −∏ (Σ (Q×R) ) 2. Q: R⋈ (Σ (S) ) : Σ (R⋈S) B) Σ (Rlojs) Rloj (Σ (S) ) D) Σ (R) Lojs
6 pages
Dbms MCQ
PDF
No ratings yet
Dbms MCQ
52 pages
QN
PDF
No ratings yet
QN
50 pages
DBIFE
PDF
No ratings yet
DBIFE
50 pages
Midterm Exam
PDF
No ratings yet
Midterm Exam
11 pages
DBMS End Term
PDF
No ratings yet
DBMS End Term
27 pages
Madeeasy Bits FORMAT
PDF
No ratings yet
Madeeasy Bits FORMAT
25 pages
Info Pract Xii Ms PB 1 Set 3
PDF
No ratings yet
Info Pract Xii Ms PB 1 Set 3
11 pages
Comph SQL (G9)
PDF
No ratings yet
Comph SQL (G9)
28 pages
K Thi: Final Exam - Ngày Thi: 09.11.2013: 2 (Next)
PDF
No ratings yet
K Thi: Final Exam - Ngày Thi: 09.11.2013: 2 (Next)
32 pages
SQL Iv
PDF
No ratings yet
SQL Iv
14 pages
Ip Practice Paper - 1 2024-25
PDF
No ratings yet
Ip Practice Paper - 1 2024-25
13 pages
Informatics Practices
PDF
No ratings yet
Informatics Practices
10 pages
XII Pre Board-I 2024-25
PDF
No ratings yet
XII Pre Board-I 2024-25
13 pages
Module 3 Study Materials
PDF
No ratings yet
Module 3 Study Materials
18 pages
Ip Preboard 2020
PDF
No ratings yet
Ip Preboard 2020
8 pages
DB Sessional-II (Solution)
PDF
No ratings yet
DB Sessional-II (Solution)
8 pages
Model 1
PDF
No ratings yet
Model 1
9 pages
Ip SQP 002
PDF
No ratings yet
Ip SQP 002
8 pages
Unit-1, 2 and 3
PDF
No ratings yet
Unit-1, 2 and 3
22 pages
Ukg Ip 8
PDF
No ratings yet
Ukg Ip 8
6 pages
DBMS Papers
PDF
No ratings yet
DBMS Papers
10 pages
Xii Ip QP
PDF
No ratings yet
Xii Ip QP
11 pages
TM351 Final Fall 2022
PDF
No ratings yet
TM351 Final Fall 2022
4 pages
2019 Spring Final Sol
PDF
No ratings yet
2019 Spring Final Sol
19 pages
TERM - 2 - XII - Computer SC - ANS
PDF
No ratings yet
TERM - 2 - XII - Computer SC - ANS
8 pages
Pratice Paper 6
PDF
No ratings yet
Pratice Paper 6
7 pages
1 - Principles of Database Design (CS208) - Supple - September 2020
PDF
No ratings yet
1 - Principles of Database Design (CS208) - Supple - September 2020
4 pages
12th - QPAPER - Half Yearly 2023
PDF
No ratings yet
12th - QPAPER - Half Yearly 2023
9 pages
Sample Paper-2
PDF
No ratings yet
Sample Paper-2
8 pages
Test 1
PDF
No ratings yet
Test 1
6 pages
Selfstudys Com File
PDF
No ratings yet
Selfstudys Com File
6 pages
Yellow Color Is The Focused Area
PDF
No ratings yet
Yellow Color Is The Focused Area
8 pages
Finalpractice 2017w
PDF
No ratings yet
Finalpractice 2017w
15 pages
DBMS1 MCQ
PDF
No ratings yet
DBMS1 MCQ
7 pages
Dfa Ad
PDF
No ratings yet
Dfa Ad
5 pages
Query Language - DPP 03 (Of Lec 09)
PDF
No ratings yet
Query Language - DPP 03 (Of Lec 09)
5 pages
Practice 3
PDF
No ratings yet
Practice 3
5 pages
Quiz-Ans Iitg Ma321
PDF
No ratings yet
Quiz-Ans Iitg Ma321
5 pages
Assignment DBMS
PDF
No ratings yet
Assignment DBMS
7 pages
Exam Dbms
PDF
No ratings yet
Exam Dbms
7 pages
DBMS Test 3 - CSE B
PDF
No ratings yet
DBMS Test 3 - CSE B
3 pages
Class Activity1-Most of The Exam From This
PDF
No ratings yet
Class Activity1-Most of The Exam From This
7 pages
1 Cs208 Principles of Database Design - Model QP
PDF
No ratings yet
1 Cs208 Principles of Database Design - Model QP
3 pages
Indian Statistical Institute: PGDBA, First Year, Final of First Semester Examination, 2019-20
PDF
No ratings yet
Indian Statistical Institute: PGDBA, First Year, Final of First Semester Examination, 2019-20
3 pages