Please enable JavaScript.
Coggle requires JavaScript to display documents.
Relational DB Languages (Tuple relational calculus (tuple Variables are…
Relational DB Languages
Relational Algebra
Domain - set of relations
set of tables
Operations
select
select tuples that satisfy F
select all tuples where deptartment nr = 4
select Sex=M(Employee)
conditions to be used
AND / OR / NOT
project
decide wich attribute to get back
removes duplicates
Cartesian Product
all combinations of tuples
it does not remove duplicates
Join
Is the same as the Cartesian product with conditions
natural join or outer
natural join uses the columns that are the same to output
left outer natural join
take all the tuples from the left table than
we supply the rest of information's that match the left table from the right table. if there is no match null is put instead data
right outer join is the opposite from the left outer join
full outer join
we do both sides at the same time
Rename attributes
Union
Joins everything and remove duplicate
must have the same number of columns
tables have the same schema but different data
Intersection
output only the data that in in both tables
DIfference
both tables must be union-compatible
Student - Instructors
division
every row on the second table must be in the first tables unique row
Tuple relational calculus
tuple Variables
are the rows
Atom
R(t)
Existential quantifier
Universal quantifier
free variables
Domain Relational Calculus
we use domain variables
EMP(a,b,c,d,e,f,g,h,....) we use the variables to represent the columns