Lecture 5- Relational Algebra Flashcards
What are the three variants of relational query language?
- Relational algebra
- Relational calculus
- SQL
What is algebra?
The study of operations in an abstract level on some domains (as a language, study of syntax and semantics of expressions)
What are two parts of relational algebra?
- Domain= set of all relations
- Expressions= referred to as queries
Operations on one table vs two tables?
- Operations on one table= pick some rows, pick some columns
- Operations on two tables= join
What is the domain, basic operations and derived operators?
- Domain = set of relations
- Basic operations = select, project, union, set difference, cartesian product, renaming
- Derived operators = set intersection, division, join
Describe the role of algebra inside of a DBMS
What is a select operator?
Select rows that satisfy the condition
This is an example of what?
Select operator
This is an example of what?
Select operator
What are the operators for select condition?
What are some simple selection conditions?
- < attribute> operator < constant>
- < attribute> operator < attribute>
- < condition> AND < condition>
- < condition> OR < condition>
- NOT < condition>
What is a project operator?
Project on (or pick) a subset of columns
This is an example of what?
Project operator
This is an example of what?
Project operator
What are some set operator operations?