relational algebra1 Flashcards

1
Q

what is relational algebra and why we use it

A

relational algebra can be defind as a notion for specfing quiries about the content of relation.
we use it becasue it ease the task
it has counter part in sql
the DBMS change our qury to notion simliear to RA.

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

relational algebra is a ————- language

A

procedurale languge i.e it tells about all the exact procedure of data in which it order it is performed.

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

define set algebra

A

set algebra: operands are sets and operators are U, ∩, −

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

what are oprand in relational algebra

A

operands are set of tuples
the output is also set of tuple

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

four opration in relational algebra are ?

A

1)cutting property i.e projection and selection
2)formal set opertion
3)joining two data set
4)renaming of attribute

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

projection?

A

vertical cut
selct subset by col
symbole is PIA1,A2,…,Ak(R)
here PI show projection a1…ak shows the attribut or col in schema R

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

important piont about projection

A

it is that if we are applying any operstion and we ancunter duplicate item so it will print once becasue the output is set of tuples and set can not have same elements.

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

key?

A

key are the importnt part of DBMS which we will be using in all opration they are define as unique element in DBMS .

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

what is selection, symbole,condition

A

it is horzintal cut apply on row
symbole is sigma
return those tuple in a row which fulfill condtion
condition are of booliean and comparsion
for seltion two attribute must have sme domain

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

which is good selction or projection

A

selction is good because it will not loose tuple

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

union

A

possible only on union comptable

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

union comptable

A

same domain
same number of attribute i.e data in short
note if a shema is not union compatable you can make it compatable by projection or selction

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

difference

A

can be done onljy on union comptable
defind as all the relation that are in R1 but not in R2.
symbole is
R1-R2

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

differnce is commutaitve or not

A

no

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

intersection

A

union compatble only
symbole is
r1 ∩ r2= (r1 - (r1 - r2 ))

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

intersection is commutative or not?

A

yes comutative