Zusammenfassung der Ressource
Relational Operators
- Arrow Product (->)
- every combination of a tuple from two
sets and concatenating them
- Dot Join (.)
- Relation you get by taking every combination of
a tuple in p and q and including their join
- cut out the middle man!
- Dot Join is not associative
- last column of p and first
column of q must agree
- Box Join
- Semantically same as dot join but
takes arguments in different order
- e1[e2] = e2.e1
- Transpose
- Takes the mirror image of binary
relation and reverse its order of atoms
- address = {(N0, D0), (N1, D1)},
~address = {(D0, N0), (D1, N1)}
- s.~r = r.s
- r.~r = relation that associates two atoms in the domain of
the relation r when they map to a common element
- Transitive Closure
(/ Reachability)
- Relation is transitive when contains tuples
a->b and b->c, it also contains a->c
- ^r = r + r.r + r.r.r...
- child relation: a maps
each person to their child
- Reflexive Transitive Closure
- the smallest relation that contains r
and is both reflexive and transitive
- is reflexive if its contains it's own
product for ever atom in itself
a->a
- Domain and Range Restriction
- s <: r contains tuples of a
relation r that start with an
element in set s
- domain restriction of r to s
- r :> s contains the tuples of r that
end with the element s
- range restriction of r to s
- Override
- The override p++q of relation p by relation
q is like the union, except any tuple in p
that matches a tuple of q by starting with
same element is dropped.