Week 5 Flashcards
(29 cards)
What is relational algebra useful for?
understanding DBMSs internals
What is relational calculus useful for?
understanding SQL
What is relational calculus?
lets users describe what they want, instead of how to compute it
What is relational algebra?
useful for representing execution plans
What are some benefits of learning relational algebra?
foundational knowledge in databases, query optimization, better data manipulation
What are operands?
variables or values from which new values can be constructed
What are operators?
symbols denoting procedures that construct new values from given values
What are relational algebra operands?
relations or variables that represent relations
What are relational algebra operators?
common things that we need to do with relations in a database
What is the result of relational algebra?
algebra that can be used as a query language for relations
What do DBMSs use relational algebra expressions to represent?
query evaluation plans
What is core relational algebra?
set semantics
What is extended relational algebra?
bag semantics
What do DB systems implement?
bag semantics
What is selection in RA?
picking certain rows
What is projection in RA?
picking certain columns
What is a cartesian product in RA?
compositions of relations
What is rename in RA?
renaming of relations and attributes
What does set semantics do to duplicates?
eliminates them
What does bag semantics do to duplicates?
retains them
Join = ???
Cross-product + Selection
What is a theta join?
a join that involves a predicate
What is an equijoin?
a case of theta-join where the join condition consists solely of equalities
What is a theta join?
join of r and s with a join condition C