Relational Algebra Flashcards

1
Q

What is relational algebra

A

It defines the theoretical ways of manipulating table contents using relational operators.

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

what are the relational operatros

A
  • Union / Intersect
  • Difference / Product
  • Select / Project / Join / Divide
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Unary operator

A

work on one table at a time.

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

Select

A

yields values for all rows in a table satisfying a certain condition.

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

project

A

yields values for selected attributes. (cols).

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

Union

A

combines rows from two tables excluding duplicates.

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

what is union-compatible

A

the two tables must have the same attribute characteristics.

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

Intersect

A

yields the rows that appear in both tables.

must be union- compatible.

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

Difference

A

Yield all rows that are in the first table that are not found in the second table.

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

product

A

AKA catersian product

  • yields all possible pairs of rows from two tables.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a join

A

A join allows information to be intelligently combined from two or more tables.

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

Natural join or Inner join

A

Returns the matched records from the tables being joined.

Naturally by:
-product
-select
-project

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

Outer join

A

The matched pairs would be retained, and any unmatched values in the
other table would be left null.

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

Left Outer join

A

All the matched rows as well as the unmatched rows of the left table. RIght will be null.

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

Right outer join

A

All matched rows plus the unmatched rows of the right table. left will be null.

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

Divide

A

identifying rows from one table associated with all rows in another.

17
Q

Data dictionary

A

A detailed description of all tables in the database.

Contains the attribute names and characteristics of the table as well as metadata.

18
Q

System catalog

A

Same as a Data dick.

19
Q

Explain the bridge bitch

A

M:N not supported directly in relational environment.

bridge entity added between to make it 1:M and M:1…. you know this

20
Q

what are Indexes

A

An index is an orderly arrangement used to logically access rows in a table.

  • spoeds the data retrieval.
21
Q

structure of an index

A
  • Has a index key and a set of pointers.

Index key is the reference point.
The pointers point to the location of the data.