relational algebra 2 Flashcards

1
Q

multiple reation define and why we need

A

split same infor in different sub parts
becasue our data is a set of different relation so to extract an info from it and then to study we will apply multiple relation in which we will make new tuple

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

cartisean product

A

define as it have tuple where the element belong to different tuple of relatiions
sybmole is
r1xr2
if two relation have same attribute so try to change it by renaming operator sigma

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

renaming operator

A

new_rel = sigma new_name<-old_name(old_rel)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

drawback, difficulties and sol in cartsian product

A

difficultities are as the cartsain product are tuple of tuple and their size is sizeAXsizeB but we need such data
soltuion is that apply selection property that select thosr row with sepcific condition like same keys!
drawback is : very costly method becasue in selction we must make a copy of cartsian product.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is natural joine , condition , syombole

A

it also select the tuple in cartsian product but it has condtion that it selct only those col which have same attribute in relation.
symbole is
r1 ⋈ r2 = piXY(sigmaC (r1 x r2 ))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

natural joine specail cases

A

case1
relation have common col (attribute name) but not the value so result will be empty set
case2
if the two relation have no common name so we do not satisfy the natural joine condition thus the result will be simple cartsian product.
solution for case 2 is just rename the diffrent attribute name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly