4.2 Relational Algebra (I) Flashcards

1
Q

What is Relational Algebra / Calculi?

A

formal query languages (not used in practice)

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

What are the two formal query languages (not used in practice)

A

Relational Calculi, and
Relational Algebra

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

Declarative query languages that allow the users to specify…

A

allows the user to specify what the data of interest are, which data one would like to retrieve, and which criteria these data have to fulfill.

User does not have to specify how a query has to be evaluated.

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

Relational Calculi is a ________________ query language

A

Declarative

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

Procedural query language requires from a user to ….

A

requires from a user to specify HOW a query has to be evaluated.

Step by step specification of operations to be executed (execution plan, access plan)

Relational Algebra is important for the processing of SQL queries.

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

Are Relational Calculi and Relational Algebra: OPEN or CLOSED?
Explain.

A

CLOSED
results of queries, which operate on relations, are again relations.

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

Relational Algebra compromises ____ (+1) basic operations

A

5

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

What are the basic operations of Relational Algebra

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

Schema Compliant: What are the conditions?

A

2 Conditions:
1. The degree must be the same (same number of attributes)
2. There exists a permutation of the indices. (matching data types (not necessarily same order).

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

What does AIRITY (degree) of a relation schema refer to?

A

Number of attributes the schema has

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

What is required for UNION operation?

A

Schema Compliant
Result schema is equal to R (or S) no change.

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

Describe a Union Operation VISUALLY

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

Describe a Union Operation WRITTEN

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

the number of tuples.

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

Number of tuples:

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

Difference Operation (-)

A

Schema Compliant
Result schema is equal to R (or S) no change

17
Q

A set does not contain ________________.

A

duplicates

18
Q

Difference Operation WRITTEN R - S = {t | ………}

A
19
Q

Difference Operation: Number of Tuples of R - S is ….

A
20
Q

Cartesian Product Operation

A

Concatenation of the schemas (attribute lists), (similar to string concatenation)

21
Q

Tuple concatenation

A
22
Q

Cartesian Product VISUALLY

A
23
Q

Cartesian Product Operation (number of tuples)

A
24
Q

Select Operation

A