Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Tests  >  Test: Tuple Calculus - Computer Science Engineering (CSE) MCQ

Test: Tuple Calculus - Computer Science Engineering (CSE) MCQ


Test Description

10 Questions MCQ Test - Test: Tuple Calculus

Test: Tuple Calculus for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Test: Tuple Calculus questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Test: Tuple Calculus MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Tuple Calculus below.
Solutions of Test: Tuple Calculus questions in English are available as part of our course for Computer Science Engineering (CSE) & Test: Tuple Calculus solutions in Hindi for Computer Science Engineering (CSE) course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Test: Tuple Calculus | 10 questions in 30 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
Test: Tuple Calculus - Question 1

Consider the following tuple relational calculus:

{t | Ǝ s ε instructor (t[name] = s[name]

 ᴧ Ǝ u ε department (u[dept_name] = s[dept_name]

   ᴧ u[building] = “Taylor”))}

What does the given expression perform?

Detailed Solution for Test: Tuple Calculus - Question 1

There are two 'there exists' clauses in the given tuple relational calculus which are connected by and (ᴧ). The tuple variable u is restricted to departments that are located in the Taylor building, while tuple variable s is restricted to instructors whose dept_name matches that of tuple variable u.

Therefore, the given expression finds the names of all instructors whose department is in the Taylor building.

Test: Tuple Calculus - Question 2

Find the customers having account all branches located in Hyderabad. Use the above relations and find which of the following query is not giving the same.

Detailed Solution for Test: Tuple Calculus - Question 2

Query 1:
It is a Tuple relational calculus query first comparing all tuples with the city is equal to Hyd in deposit table and fetch the customer name when  city="Hyd".

Query 2:
It is a Domain relational calculus query first comparing city domain with city equal to Hyd in deposit table and fetch the customer name when city="Hyd".

Query 3:
It is a relational algebra query, In the first step fetch all names whose city hyd in the branch table. And the second step joining the deposit and branch and comparing the city equal to 'Hyd' with fetching city_name and branch_name. Finally, division step 2 with step1 will results in customers having account all branches located in Hyderabad.

Hence the correct answer is all the above are giving the same result.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Tuple Calculus - Question 3

Which of the given tuple calculus expressions can be used to find first name and last name of all the employees whose salary is above $15000 from the relation EMPLOYEE?

Detailed Solution for Test: Tuple Calculus - Question 3

The condition EMPLOYEE(t) specifies that the range relation of tuple variable t is EMPLOYEE. First name and last name of EMPLOYEE tuple t that satisfies the condition t.Salary > 15000 will be retrieved.

{t.Fname, t.Lname | EMPLOYEE(t) AND t.Salary > 15000} is the correct expression.

Test: Tuple Calculus - Question 4

Consider the expression t ϵ instructor ∧ ∃ s ϵ department (t [dept_name] = s [dept_name]) the variables t and s are _____ respectively. 

Detailed Solution for Test: Tuple Calculus - Question 4
  • A tuple variable t is bound if it is quantified, meaning that it appears in existential or universal quantifier clause, otherwise it is free. Formally, tuple variable is free or bound as :
  • An occurrence of a tuple variable in a formula F that is an atom is free in F.
  • An occurrence of a tuple variable t is free or bound in a formula made up of logical connectives – (F1 AND F2), (F1 OR F2), NOT(F1) and NOT(F2)- depending on whether it is free or bound in F1 or F2. In a formula of the form F = (F1 AND F2) or F = (F1 OR F2), a tuple variable may be free in F1 and bound in F2 or vice versa.
  • All free occurrences of a tuple variable t in F are bound in F’ of form F’ = (∃ t) F or F’ = (for all t)F

Here, given expression is :
t ϵ instructor ∧ ∃ s ϵ department (t [dept_name] = s [dept_name])

According to above rules:
t is the free variable and s is the bound variable.

*Answer can only contain numeric values
Test: Tuple Calculus - Question 5

Consider a database that has the relation schema Random(A, B, C). An instance of the schema Random is as given below.

Tuple calculus expression for the above instance is given as  {t.B | t ϵ r ∧ (t[A] = 10  ∧ t[C] = 7)}

What is the sum of the elements in the output row of the given expression?


Detailed Solution for Test: Tuple Calculus - Question 5

Test: Tuple Calculus - Question 6

A Tuple Relational Calculus query is expressed as ________.

Detailed Solution for Test: Tuple Calculus - Question 6

Tuple relational calculus is to select the tuples. It is represented by:
{T | P(T)}
P(T) is condition to fetch the tuple T.

Example:
{T.name| Author(T) AND T.book = ‘Operating system’}
It selects the tuple having author of book Operating system.

Test: Tuple Calculus - Question 7

Which among the following is/are false?

I. Relational algebra is more powerful than relational calculus.
II. Relational calculus is more powerful than relational algebra.
III. Relational algebra is as same power as relational calculus.

Detailed Solution for Test: Tuple Calculus - Question 7

Every query that can be expressed using a safe relational calculus query can also be expressed as a relational algebra query.
Therefore, relation algebra has the same power as safe relational calculus
Option 4 is correct

Confusion Points:
Relational algebra is not having same power as relational calculus unless it is safe relational calculus

Test: Tuple Calculus - Question 8

Consider the Relations COLLEGE(CollegeID, Name, Location) and FACULTY(FacultyName, FacultyID, CollegeID). Which of the following is correct tuple calculus equivalent to the following statement?

“Name all the faculties in college ‘TESTBOOK’.”

Detailed Solution for Test: Tuple Calculus - Question 8

Option 1: {t, c, f | ∃f ϵ COLLEGE(t[FacultyName] = f[FacultyName] ∩ ∃c ϵ COLLEGE(c[CollegeID] = f[CollegeID] ∩ c[Name] = “TESTBOOK”))}
This Query is not correct. Since this Query will return facultyName, collegeID, and facultyName.

Option 2: {t | ∃f ϵ FACULTY(t[FacultyName] = f[FacultyName] ∩ ∃c ϵ COLLEGE(c[FacultyName] = f[CollegeID] ∩ c[Name] = “TESTBOOK”))}
This Query is not correct. because there is no attribute name FacultyName in COLLEGE relation ( since ∃c ϵ COLLEGE).

Option 3: {t, c, f | ∃f ϵ FACULTY(t[FacultyName] = f[FacultyName] ∩ ∃c ϵ COLLEGE(c[CollegeID] = f[CollegeID] ∩ c[Name] = “TESTBOOK”))}
This Query is not correct. Since this Query will return facultyName, collegeID, and facultyName.

Option 4: {t| ∃f ϵ FACULTY(t[FacultyName] = f[FacultyName] ∩ ∃c ϵ COLLEGE(c[CollegeID] = f[CollegeID] ∩ c[Name] = “TESTBOOK”))}
This Query is correct.

Test: Tuple Calculus - Question 9

A row in a relational database table is also called.

Detailed Solution for Test: Tuple Calculus - Question 9

Tuple − A single row of a table, which contains a single record for that relation is called a tuple.

Test: Tuple Calculus - Question 10

Which of the following uses domain variable that take on values from an attributes domain, rather that values for an entire tuple.?

Detailed Solution for Test: Tuple Calculus - Question 10

The question asks for the type of relational calculus that uses domain variables that take on values from an attribute's domain, rather than values for an entire tuple.
From the explanations:

Tuple Relational Calculus (TRC) uses tuple variables, not domain variables.
Relational Algebra operates on entire relations and does not use domain variables.
Domain Relational Calculus (DRC) specifically uses domain variables that take on values from an attribute’s domain.
Thus, the correct answer is:

C: Domain relational calculus

Information about Test: Tuple Calculus Page
In this test you can find the Exam questions for Test: Tuple Calculus solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Tuple Calculus, EduRev gives you an ample number of Online tests for practice

Top Courses for Computer Science Engineering (CSE)

Download as PDF

Top Courses for Computer Science Engineering (CSE)