# NPTEL Introduction to Database Systems Assignment 4 Answers 2023

Feb 12, 2023

Hello Learners, In this Post, you will find NPTEL Introduction to Database Systems Assignment 4 Week 4 Answers 2023. All the Answers are provided below to help the students as a reference don’t straight away look for the solutions.

###### NPTEL Introduction to Database Systems Assignment 5 Answers Join Group👇

Note: First try to solve the questions by yourself. If you find any difficulty, then look for the solutions.

## NPTEL Introduction to Database Systems Assignment 4 Answers 2023:

We are updating answers soon Join Group for update: CLICK HERE

#### Q.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

#### Q.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)Uσ(B=20)(r)
• σ(A=10)(r)∩σ(B=20)(r)
• σ(A=10)(r)ーσ(B=20)(r)

#### Q.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

#### Q.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′}

#### Q.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

#### Q.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

#### Q.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.

• 2000
• 2500
• 4500
• 5000

#### Q.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

#### Q.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
##### NPTEL Introduction to Database Systems Assignment 4 Answers Join Group👇

Disclaimer: This answer is provided by us only for discussion purpose if any answer will be getting wrong don’t blame us. If any doubt or suggestions regarding any question kindly comment. The solution is provided by Brokenprogrammers. This tutorial is only for Discussion and Learning purpose.

#### About NPTEL Introduction to Database Systems Course:

Databases are the backbone of almost all the digital services and e-governance solutions. Modern businesses and financial systems heavily depend on databases systems and transaction processing for their successful operation. This course introduces the students to the various theoretical and practical principles involved in the design and use of databases systems with the help of database management systems (DBMS) and the SQL Standard

##### Course Layout:
• Week 1   : Introduction and part of E/R Model Module
• Week 2   : ER Model Module
• Week 3   : Relational Model Module
• Week 4   : Relational Model Module
• Week 5   : TRC Module and part of SQL Module
• Week 6   : SQL Module
• Week 7   : Indexes Module
• Week 8   : Indexes Module + Query Processing Module
• Week 9   : Normal Forms Module
• Week 10 : Normal Forms Module
• Week 11 : Transaction Processing Module
• Week 12 : Transaction Processing Module
###### CRITERIA TO GET A CERTIFICATE:

Average assignment score = 25% of average of best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100

Final score = Average assignment score + Exam score

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.

If you have not registered for exam kindly register Through https://examform.nptel.ac.in/