wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Relational Algebra and Calculus

Total questions: 20

Worksheet time: 9mins

Name
Class
Date
1.

Relational Algebra is a __________ query language that takes two relations as input and produces another relation as an output of the query.

a)

Relational

b)

Structural

c)

Procedural

d)

Fundamental

2.

Which of the following is used to denote the selection operation in relational algebra?

a)

Pi

b)

Sigma

c)

Lambda

d)

Omega

3.

For select operation the ________ appear in the subscript and the ___________ argument appears in the paranthesis after the sigma.

a)

Predicates, relation

b)

Relation, Predicates

c)

Operation, Predicates

d)

Relation, Operation

4.

The ___________ operation, denoted by −, allows us to find tuples that are in one relation but are not in another.

a)

Union

b)

Set Difference

c)

Division

d)

Intersection

5.

Which is a join condition contains an equality operator:

a)

Equi Join

b)

Cartesian

c)

Natural

d)

Left

6.

In precedence of set operators, the expression is evaluated from

a)

Left to Right

b)

Right to Left

c)

From user specification

d)

Left & Right both in parallel

7.

Find the ID, name, dept name, salary for instructors whose salary is greater than $80,000

a)

{t | t ε instructor ∧ t[salary] > 80000}

b)

Э t ∈ r (Q(t))

c)

{t | Э s ε instructor (t[ID] = s[ID]∧ s[salary] > 80000)}

d)

None of these

8.

A query in the tuple relational calculus is expressed as:

a)

{t | P() | t}

b)

{P(t) | t }

c)

{t | P(t)}

d)

All of these

9.

Which of the following symbol is used in the place of except?

a)

^

b)

v

c)

¬

d)

*

10.

“Find all students who have taken all courses offered in the Biology department.” The expressions that matches this sentence is :

a)

Э t ε r (Q(t))

b)

∀ t ε r (Q(t))

c)

¬ t ε r (Q(t))

d)

~ t ε r (Q(t))

11.

Which of the following is the comparison operator in tuple relational calculus

a)

b)

=

c)

ε

d)

All of these

12.

An expression in the domain relational calculus is of the form

a)

{P(x1, x2, . . . , xn) | < x1, x2, . . . , xn >}

b)

{x1, x2, . . . , xn | < x1, x2, . . . , xn >}

c)

{x1, x2, . . . , xn | x1, x2, . . . , xn}

d)

{< x1, x2, . . . , xn > | P(x1, x2, . . . , xn)}

13.

In domain relational calculus “there exist” can be expressed as

a)

(P1(x))

b)

(P1(x)) Э x

c)

V x (P1(x))

d)

Э x (P1(x))

14.

A set of possible data values is called

a)

Attribute

b)

Degree

c)

Tuple

d)

Domain

15.

When we want to display records with attributes from many relations then we use:

a)

SELECT operation

b)

PROJECT operation

c)

JOIN operation

d)

PERFORM operation

16.

Relational Calculus describes about

a)

'How' to evaluate a query

b)

'What' is to be retrieved

c)

'When' to evaluate a query

d)

'Not' to evaluate a query

17.

SELECT operator works _____ wise whereas PROJECT operator works _______ wise.

a)

Row, Column

b)

Column, Row

c)

Row, Row

d)

Column, Column

18.

In order to perform Union operation on two relations, both operand and relations must be

a)

Union compatible

b)

Set compatible

c)

Difference compatible

d)

User compatible

19.

Relational Calculus is of ______ types

a)

2

b)

3

c)

4

d)

5

20.

QBE stands for

a)

Query By Example

b)

Query By Entity

c)

Question By Example

d)

Question By Entity