Relational Calculcus Flashcards

1
Q

SELECT

A

σ (select condition) R

Unary operation
Applies to rows
Commutative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

PROJECT

A

π (attribute list) R

Unary operation
Applies to columns
Removes duplicate tuples

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

RENAME

A

ρ (new attribute names) (R)

Applies to tables and columns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

UNION

A

R ∪ S

Result is all tuples that are either in R, in S or in both.
Duplicate tuples are eliminated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

INTERSECTION

A

R ∩ S

Result is rows that are in R and in S

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

SET DIFFERENCE

A

R - S

Result is rows that are in R, but not in S
Not commutative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

CROSS JOIN (also called Cartesian Product)

A

R x S

Combines every tuple from one set with every tuple from another (Total number of tuples should be # in R * # in S)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

JOIN

A

R ⋈ S

Combines two related tuples into one big tuple

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

θ JOIN

A

θ = any conditional operator

Excludes NULL or any result where θ isn’t true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

EQUIJOIN

A

Uses = operator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

NATURAL JOIN

A

Same as EQUIJOIN if all columns share the same names

Removes duplicate column names

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

OUTER UNION

A

Allows union of two relations that are not union compatible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

LEFT OUTER JOIN

A

Keeps every tuple on the left, but fills in matches on right where applicable. No matches are padded with NULLs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

RIGHT OUTER JOIN

A

Keeps every tuple on the right, but fills in matches on the left where applicable. No matches are padded with NULLs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

FULL OUTER JOIN

A

Keeps all tuples on both sides, even if they don’t match

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

INNER JOIN

A

Tuples that do not match the criteria are not displayed