Docsity

Database Engineering Homework 6: Relational Algebra Operations, Assignments of Control Systems

Toggle sidebar
bg1
EECE 4/6253 Database Engineering
Homework #6
1. Given the relations R and S below, compute the following:
R(A,B) = { <a,b>, <c,b>, <d,e> }
S(B,C) = { <b,c>, <e,a>, <b,d> }
a) R ∪ S = {<a,b>, <b,c>, <c,b>, <e,a>, <d,e>, <b,d>
Note: need to rename relation S’s attributes to be the same as R’s then resulting schema is
(A, B).
b) R – S = {<a,b>, <c,b>, <d,e>
Note: need to rename relation S’s attributes to be the same as R’s then resulting schema is
(A, B).
c) R * S = { <a,b,c,>, <c,b,c>, <a,b,d>, <c,b,d>, <d,e,a> }
Schema: (A,B,C)
d) ΠA(R) = { <a>, <c>, <d>}
Schema: (A)
e) σA=C(R X S) = { <a,b,e,a>, <c,b,b,c>, <d,e,b,d> }
Note: need to rename attribute S.B in Schema (A,B,S.B,C)
f) S semi join S = { <b,c>, <b,d>, <e,a> }
Schema: (B,C)
g) S ÷ T in which T(C) = { <b>, <c> } = {}
h) R * S = {<a,b,b,c>, <a,b,b,d>, <c,b,b,c>}
B < C
Note: need to rename attribute S.B in Schema (A,B,S.B,C)

Partial preview of the text

Download Database Engineering Homework 6: Relational Algebra Operations and more Assignments Control Systems in PDF only on Docsity!

EECE 4/6253 Database Engineering Homework #

  1. Given the relations R and S below, compute the following: R(A,B) = { , , } S(B,C) = { , , } a) R ∪ S = {, , , , , Note: need to rename relation S’s attributes to be the same as R’s then resulting schema is (A, B). b) R – S = {, , Note: need to rename relation S’s attributes to be the same as R’s then resulting schema is (A, B). c) R * S = { , , , , } Schema: (A,B,C) d) ΠA(R) = { , , } Schema: (A) e) σA=C(R X S) = { , , } Note: need to rename attribute S.B in Schema (A,B,S.B,C) f) S semi join S = { , , } Schema: (B,C) g) S ÷ T in which T(C) = { , } = {} h) R * S = {, , } B < C Note: need to rename attribute S.B in Schema (A,B,S.B,C)