Relational Algebra Practice - 2
Relational Algebra Practice - 2
in database manageme…
One stop guide to computer science students for solved questions, Notes, tutorials, solved exercises,
online quizzes, MCQs and more on DBMS, Advanced DBMS, Data Structures, Operating Systems,
Machine learning, Natural Language Processing etc.
Advanced Database Concepts Data structures, Operating Systems Natural Language Processing Quiz Questions and Ans
DBMS, ADBMS Question Bank SQL RDBMS Exam and Interview Questions Parallel Databases ADBMS Quizzes
Advanced DBMS Concepts Distributed Databases Modern Databases - Special Purpose Databases
Powered by Translate
Home
https://www.exploredatabase.com/2020/04/relational-algebra-in-database-solved-exercise.html 1/4
9/4/23, 12:10 PM Computer Science and Engineering - Tutorials, Notes, MCQs, Questions and Answers: Relational algebra in database manageme…
Labels
c) Find only the flight numbers for passenger with pid 123 for flights to Chennai before 06/11/2020.
Normalization
Π fid (σ pid = 123 (booking) ⨝ σ dest = “Chennai” ^ fdate < 06/11/2020 (flight)) Database Quizzes
Machine Learning Qu
Distributed Database (52) N
Data Structures (41) Quest
[Hint: Given conditions are pid, dest, and fdate. To get the flight id for a passenger given a pid, we (36) NLP Quiz Questio
Transaction Managemen
have two tables flight and booking to be joined with necessary conditions. From the result, the flight Solved Exercises (34) ER M
id can be projected] DBMS Question Paper (29)
Real Time Database (22) Min
----------------------------------------------------------------------------------------------------- (20) Parallel Database (17) Ind
Normal Forms (16) Object Data
2PC Protocol (13) NLP solved ex
natural language processing
d) Find the passenger names for passengers who have bookings on at least one flight. Storage Access Exercises (12) SQ
(12) Concurrency Control (11) De
e) Find the passenger names for those who do not have any bookings in any flights.
[Hint: here applied a set difference operation. The set difference operation returns only pids that have
no booking. The result is joined with passenger table to get the passenger names.]
-----------------------------------------------------------------------------------------------------
f) Find the agency names for agencies that located in the same city as passenger with passenger id
123.
[Hint: we performed a theta join on equality conditions (equi join) here. This is done between details
of passenger 123 and the agency table to get the valid records where the city values are same. From
the results, aname is projected.]
-----------------------------------------------------------------------------------------------------
g) Get the details of flights that are scheduled on both dates 01/12/2020 and 02/12/2020 at 16:00
hours.
h) Get the details of flights that are scheduled on either of the dates 01/12/2020 or 02/12/2020 or
both at 16:00 hours.
i) Find the agency names for agencies who do not have any bookings for passenger with id 123.
j) Find the details of all male passengers who are associated with Jet agency.
*************
Related links:
RELATED POSTS:
4 comments:
Is that last RA query wrong ? .. I think you forgot to filter upon the Jet agency
Reply
https://www.exploredatabase.com/2020/04/relational-algebra-in-database-solved-exercise.html 3/4
9/4/23, 12:10 PM Computer Science and Engineering - Tutorials, Notes, MCQs, Questions and Answers: Relational algebra in database manageme…
Replies
Thanks. Corrected
Reply
Reply
nyc presentation
Reply
Enter Comment
Featured Content
MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...
Contributors
Saravanakumar Kandasamy
Report Abuse
Disclaimer
Dear readers, though most of the content of this site is written by the authors and contributors of this site, some of the content are searched, found and compiled from various other Internet sources for the
readers.
Copyright © exploredatabase.com 2020. All rights reserved. Theme images by gaffera. Powered by Blogger.
data recovery
https://www.exploredatabase.com/2020/04/relational-algebra-in-database-solved-exercise.html 4/4