4.2 Relational Algebra (I) Flashcards
What is Relational Algebra / Calculi?
formal query languages (not used in practice)
What are the two formal query languages (not used in practice)
Relational Calculi, and
Relational Algebra
Declarative query languages that allow the users to specify…
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.
Relational Calculi is a ________________ query language
Declarative
Procedural query language requires from a user to ….
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.
Are Relational Calculi and Relational Algebra: OPEN or CLOSED?
Explain.
CLOSED
results of queries, which operate on relations, are again relations.
Relational Algebra compromises ____ (+1) basic operations
5
What are the basic operations of Relational Algebra
Schema Compliant: What are the conditions?
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).
What does AIRITY (degree) of a relation schema refer to?
Number of attributes the schema has
What is required for UNION operation?
Schema Compliant
Result schema is equal to R (or S) no change.
Describe a Union Operation VISUALLY
Describe a Union Operation WRITTEN
the number of tuples.
Number of tuples: