Engineering Questions with Answers - Multiple Choice Questions

MCQs on Tuple Relational Calculus and Domain Relational Calculus

1 - Question

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 the mentioned

View Answer

Answer: a
Explanation: This expression is in tuple relational format.




2 - Question

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 the mentioned

View Answer

Answer: c
Explanation: The tuple relational calculus, is a nonprocedural query language. It describes the desired information without giving a specific procedure for obtaining that information.




3 - Question

{t | Э s ε instructor (t[name] = s[name]
∧ Э u ε department (u[dept name] = s[dept name]
∧ u[building] = “Watson”))}

Which of the following best describes the query?
a) Finds the names of all instructors whose department is in the Watson building
b) Finds the names of all department is in the Watson building
c) Finds the name of the dapartment whose instructor and building is Watson
d) Returns the building name of all the departments

View Answer

Answer: a
Explanation: This query has two “there exists” clauses in our tuple-relational-calculus expression, connected by and (∧).




4 - Question

Which of the following symbol is used in the place of except?
a) ^
b) V
c) ¬
d) ~

View Answer

Answer: c
Explanation: The query ¬P negates the value of P.




5 - Question

“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))

View Answer

Answer: b
Explanation: ∀ is used denote “for all” in SQL.




6 - Question

Which of the following is the comparison operator in tuple relational calculus
a) ⇒
b) =
c) ε
d) All of the mentioned

View Answer

Answer: b
Explanation: The comparison operators are (<, ≤, =, =, >, ≥).




7 - Question

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)}

View Answer

Answer: d
Explanation: Here x1, x2, . . . , xn represent domain variables. P represents a formula composed of atoms, as was the case in the tuple relational calculus.




8 - Question

Find the names of all instructors in the Physics department together with the course id of all courses they teach:
a)

{< c > | Э s (< c, a, s, y, b, r, t >ε section
∧s = “Fall” ∧ y = “2009”
∨Эu (< c, a, s, y, b, r, t >ε section
∧s = “Spring” ∧ y = “2010”

b)

{< n, c > | Э i, a (< i, c, a, s, y > ε teaches
∧ Э d, s (< i, n, d, s > ε instructor ∧ d = “Physics”))}

c)

{< n > | Э i, d, s (< i, n, d, s > ε instructor ∧ s > 80000)}

d)

{< i, n, d, s > | < i, n, d, s > ε instructor ∧ s > 80000}
View Answer

Answer: b
Explanation: None.




9 - Question

In domain relaional calculus “there exist” can be expressed as
a) (P1(x))
b) (P1(x)) Э x
c) V x (P1(x))
d) Э x (P1(x))

View Answer

Answer: d
Explanation:Э is used to denote “some” values in relational calculus.




10 - Question

A set of possible data values is called
a) Attribute
b) Degree
c) Tuple
d) Domain

View Answer

Answer: d
Explanation: None.

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners