NPTEL Introduction to Database Systems Week 4 Assignment Answers 2025

NPTEL Introduction to Database Systems Week 4 Assignment Answers 2025

1. Which of the following relational query languages have the same expressive power?
I) Relational Algebra
II) Tuple relational calculus restricted to safe expressions
III) Relational Algebra with Select, Project, Cross-Product, Union and Difference operators only

  • II and III only
  • I and II only
  • I and III only
  • I, II and III
Answer :- For Answers Click Here 

2. What is the relational algebra expression equivalent to the following tuple relational calculus expression, where r is a relation name?
{ t | r(t) ⋀ ( t.A = 10 ⋀ t.B = 20) }

  • σ(A=10⋁B=20)(r)
  • σ(A=10)(r)∪σ(B=20)(r)
  • σ(A=10)(r)∩σ(B=20)(r)
  • σ(A=10)(r)ーσ(B=20)(r)
Answer :- 

3. Consider the following two statements and choose the correct option:
S1: Each record of the referencing relation can relate to at most one record of the referenced relation.
S2: Each record of the referenced relation can relate to at most one record of the referencing relation.

  • S1 is true, S2 is true
  • S1 is false, S2 is true
  • S1 is false, S2 is false
  • S1 is true, S2 is false
Answer :- 

4. Given the following relational schema

Employee( EmpID, EmpName, Salary, Age, Address, Department, HireDate)

Which of the following TRC query retrieves employee id where the employee’s salary is greater than ₹ 60,000, the employee’s age is less than 40, the employee’s department is either “IT” or “Marketing”, and the employee’s hire date is after January 1st, 2020.

Choose the correct option:

  • { t.EmpID | Employee(t) ∧ t.Salary > 60000 ∧ t.Age < 40 ∧ (t.Department = “IT” ⋁ t.Department = “Marketing”) ∧ t.HireDate > ’01/01/2020′}
  • { t.EmpID | Employee(t) ∧ t.Salary > 60000 ⋁ t.Age < 40 ⋁ (t.Department = “IT” ∧ t.Department = “Marketing”) ⋁ t.HireDate > ’01/01/2020′}
  • { t.EmpID | Employee(t) ∧ (t.Salary > 60000 ∧ t.Age < 40) ⋁ (t.Department = “IT” ∧ t.Department = “Marketing”) ∧ t.HireDate > ’01/01/2020′}
  • { t.EmpID | Employee(t) ∧ (t.Salary > 60000 ⋁ t.Age < 40) ∧ (t.Department = “IT” ⋁ t.Department = “Marketing”) ∧ t.HireDate > ’01/01/2020′}
Answer :- 

5. There are two weak entities E1 and E2, where E1 is the owner entity for E2.
Consider relational representation of E1 and E2 and choose correct option:

  • Mapping of E1 should be done before E2
  • Mapping of E2 should be done before E1
  • E1 and E2 can be mapped in any order
  • Partial key of E1 includes the partial key of E2
Answer :- 

6. Consider the relation
employee( name, sex, supervisorName )
The attribute supervisorName gives the name of the supervisor of the employee under consideration. What does the following Tuple Relational Calculus query produce?
{ e.name | employee(e) ⋀
(∀x) [ ㄱemployee(x) ⋁ x.supervisorName ≠ e.name ⋁ x.sex = “male” ]}

  • Names of employees with a male supervisor
  • Names of employees with no immediate male supervisees
  • Names of employees with no immediate female supervisees
  • Names of employees with a female supervisor
Answer :- For Answers Click Here 

7. Given the following relational schemas
Student (rollNo, name, age, sex, deptNo, advisor)
Department (deptId, dName, hod, phoneNo)

  • Which of the following will be the TRC query to obtain the department names that do not have any girl students?
  • {d.dname | department(d) ∧ ¬((∃(s)) student(s) ∧ s.sex ≠ ‘F’ ∧ s.deptNo = d.deptId)}
  • {d.dname | department(d) ∧ ((∀(s)) student(s) ∧ s.sex ≠ ‘F’ ∧ s.deptNo = d.deptId)}
  • {d.dname | department(d) ∧ ¬((∃(s)) student(s) ∧ s.sex = ‘F’ ∧ s.deptNo = d.deptId)}
  • None of these.
Answer :- 

8. Consider the relations S1( A, B, C ) and S2( C, D, E ) with primary keys A and C, respectively. The relation S1 contains 2000 tuples and S2 contains 2500 tuples. The maximum size of the join S1 ⋈S1.C = S2.C S2 is

  • 2000
  • 2500
  • 4500
  • 5000
Answer :- 

9. Consider the following relational schema where rollNo and courseId are foreign keys in Enrollment referring to rollNo in Student and courseId in Courses, respectively:
Student( rollNo, name, degree, year, sex, deptNo, advisor )
Courses( courseId, cname, credits, deptNo )
Enrollment( rollNo, courseId, sem, year, grade )
Consider the TRC query given below:

{s.rollNo, s.name | Student(s) ∧ (∃e1)( Enrollment(e1) ∧ (e1.rollNo = s.rollNo)) }

Which one of the following is the correct interpretation of the above query?

  • Retrieve rollNo and name of students who have enrolled for exactly one course
  • Retrieve rollNo and name of students who have enrolled for more than one course
  • Retrieve rollNo and name of students who have enrolled for at least one course
  • Retrieve rollNo and name of students who have all enrolled for same course
Answer :- 

10. Consider the statements given below:
P: Tuple Relational Calculus (TRC) is a non-procedural query language
Q: Tuple Relational Calculus (TRC) expression specifies what is to be retrieved rather than how to retrieve it

Choose the correct option:

  • P is true and Q is false
  • Both P and Q are true and Q is the correct reason for P
  • Both P and Q are true and Q is not the correct reason for P
  • Both P and Q are false
Answer :- For Answers Click Here 
Scroll to Top