Relational Algebra Flashcards

1
Q

Filters the tuples of a resulting relation R based on the condition provided.

A

Select Operation

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

Operation that uses the where clause.

A

Select Operation

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

Operation where the number of attributes from the original relation is the same with the resulting relation but with more or less tuples.

A

Select Operation

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

Filters the attributes/columns of a resulting relation R based on the attributes listed.

A

Project Operation

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

Renames the attributes, the relation or both.

A

Rename Operation

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

Operation that uses the select clause.

A

Project Operation

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

Operation that uses the “as” clause or alias.

A

Rename Operation

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

Show all employees whose monthly salary is above PhP30,000 and belongs to department 3, 4, and 5.

A

O salary > 3000 and department >= 3 and department <= 5 (employee)

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

Show all last names, department numbers, monthly salaries of employees.

A

Pi lastname, department, salary (employee)

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

Show the last names and department numbers of employees whose monthly salary is greater than Php 30,000

A

Pi lastname, department (O salary > 30000 (employee))

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

Given a relation dept with attributes (deptno, dname, loc), rename the attributes deptno to deptnumber and loc to location.

A

P dept(deptnumber,dname,location) (dept)

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

Assumes type compatibility and the resulting column header, if valid operation, comes from the first relation.

A

Set Operation

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

Allows us to create a relation between two or more relations.

A

Set Operations/Join and Join-like operations

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

Given two relations S and T, they are said to be type compatible iff: (2 reasons)

A
  1. They have the same number of attributes
  2. Type(as1 = at1_, type(as2 = at2), …, type(asn =atn)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the three different set operations you can perform on relational algebra?

A

Set difference (-), union (U), and intersection (inverted U)

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

In this operation, if attributes have the same name, the columns are preserved.

A

Join and join-like operations.

16
Q

Given relation S and T, this matches all tuples from S and T if the values from the attributes common to S and T are the same.

A

Natural Join (*)

17
Q

Given relations S and T, equi-join matches all tuples from S and T if the values from the attributes define to match from S and T.

A

Equi-Join (ribbon symbol)

18
Q

Given relations S and T, semi-join behaves like a natural join except that it does not include the columns in S or T

A

Semi-join (partial ribbon)

19
Q

Given relations S and T, anti-join behaves like a semi-join but shows only tuples in S not present in T.

A

Anit-join (triangle >)

20
Q

Given relations S and T, the result of division is the set of columns as’ (from S) where the values from column(s) at’ are present.

21
Q

In this operation, if attributes have the same name, the columns are preserved but includes non-matching tuples.

A

Outer join operations

22
Q

Allows us to join relations S and T allowing S tuples to appear without matching tuples from T.

A

Left Outer Join ( ]ribbon )

23
Q

Allows us to join relations S and T allowing T tuples to appear without matching tuples from T.

A

Right outer join ( ribbon[ )

24
Allows us to join relations S and T allowing S and T tuples to appear without matching tuples from T.
Full outer join ( ]ribbon[ )