Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
The division operator of relational algebra, “÷”, is defined as follows. Let r(R) and s(S) be relations, and let S ⊆ R; that is, every attribute of schema S is also in schema R. Given a tuple t, let t[S] denote the projection of tuple t on the attributes in S. Then r ÷ s is a relation on schema R − S (that is, on the schema containing all attributes of schema R that are not in schema S). A tuple t is in r ÷ s if and only if both of two conditions hold: • t is in ΠR−S(r) • For every tuple ts in s, there is a tuple tr in r satisfying both of the following: a. tr[S] = ts[S] b. tr[R − S] = t Given the above definition: a. Write a relational algebra expression using the division operator to find the IDs of all students who have taken all Comp. Sci. courses. (Hint: project takes to just ID and course id, and generate the set of all Comp. Sci. course ids using a select expression, before doing the division.) b. Show how to write the above query in relational algebra, without using division. (By doing so, you would have shown how to define the division operation using the other relational algebra operations.) |
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- The division operator of relational algebra, “÷”, is defined as follows. Let r(R)and s(S) be relations, and let S ⊆ R; that is, every attribute of schema S isalso in schema R. Given a tuple t, let t[S] denote the projection of tuple t onthe attributes in S. Then r ÷ s is a relation on schema R − S (that is, on theschema containing all attributes of schema R that are not in schema S). A tuplet is in r ÷ s if and only if both of two conditions hold:• t is in ΠR−S(r)• For every tuple ts in s, there is a tuple tr in r satisfying both of the following:a. tr[S] = ts[S]b. tr[R − S] = tGiven the above definition:a. Write a relational algebra expression using the division operator to findthe IDs of all students who have taken all Comp. Sci. courses. (Hint:project takes to just ID and course_id, and generate the set of all Comp.Sci. course_ids using a select expression, before doing the division.)b. Show how to write the above query in relational algebra, without usingdivision. (By doing so, you…arrow_forwardThe following digraph represents a relation R. a C b d List the ordered pairs in the relation. R = { }.arrow_forwardSuppose we have the following relation schema R and set of functional dependencies F: R = (A, B, C, D, E, F, G) F = { A->BC CD - AB EF AD В - АЕF} For each of the following, determine whether it is in F+ (i.e., can be derived from F). If the answer is yes, show how it can be derived step by step (and indicate which rule in Armstrong axioms is involved). If not, explain why. (а) AD-> EF (b) B CD (c) DE → AC (d) CEF – Garrow_forward
- Let R be a relation on A = {0, 1, 3, 5). If (0, 3) E R, what must be an element of R for R to be symmetric?arrow_forwardJ 1 Let R(A, B, C, D, E, F) be a relation schema, and let S = {A → B, BC → D, E → C, D →A, B → D} be a set of functional dependencies. Use the Nonadditive Join Test for Binary Decomposition to determine if the following decomposition is lossless.arrow_forwardConsider the relation schema R(A, B, C, D, E, F) and the set S = {AB->C, BC->AD, D->E, C->B) of functional dependencies. Assuming that R is decomposed into the relation schemas R1(A,B), R2(B,C), R3(A,B,D,E) and R4(E,F). Use the Chase test to show if this is a lossless decomposition.arrow_forward
- Consider the following set F of functional dependencies on the relation schema (A, B, C, D, E, G): А — ВCD ВС — DE В — D D→A Give a BCNF decomposition of the given schema using the original set F of functional dependencies.arrow_forwardConsider the following set F of functional dependencies on the relation schema (А, В, С, D, E, G): А— ВCD ВС — DE В — D D → Aarrow_forwardConsider the following five relations on the set A = {1, 2, 3, 4}. Determine which of the * .relations are reflexive R2 = {(1, 1)(1, 2), (2, 1), (2, 2), (3, 3), (4, 4)} R4 = A x A R1 = {(1, 1), (1, 2), (2, 3), (1, 3), (4, 4)} R3 = {(1, 3), (2, 1)}arrow_forward
- Consider a relation schema R = {A, B, C, D, E, F, G} with the following set of functional dependencies: F = {BG A, A BC, BC A, BD E, E →F, CF B} The decomposition of R into R1 =A, B, C, G), R2 = {B, D, E), R3 = {B, C, F} and R4 = {E, F} is O In 3NF but Not in BCNF. O In 3NF and in BCNF. O Not in 3NF and Not in BCNF O In BCNF but Not in 3NF.arrow_forwardFor each of the following pairs of expressions, give instances of relations thatshow the expressions are not equivalent. ΠA(r − s) and ΠA(r) − ΠA(s).arrow_forwardConsider the relation r(A,B ) with the following instance of r. Which of the functional dependencies do NOThold on this instance?(a) C → A(b) B → A(c) AB → C(d) A → C(e) B → C Instance of r is attachedarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education