SciShowEngineer Provides Tutorials of C Programming, Python, Java, C++ and Interview Question. also Nptel, HackerRank and CodeChef Solution, Job Updates
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
INTENDED AUDIENCE : Any Interested Learners
PREREQUISITES : Studying B Tech (computer science) 3rd year, Discrete Mathematics or Discrete Structures, Programming and Data Structures
Nptel Introduction to Database Systems Week 4 Assignment Answer
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
Nptel Introduction to Database Systems Week 4 Assignment Answer
Week 4 : Assignment 4
Due date: 2025-02-19, 23:59 IST.
Assignment not submitted
1 point
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
1 point
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)(r)∪σ(B=20)(r)σ(A=10)(r)∪σ(B=20)(r)
σ(A=10)(r)∩σ(B=20)(r)σ(A=10)(r)∩σ(B=20)(r)
σ(A=10)(r)ーσ(B=20)(r)σ(A=10)(r)ーσ(B=20)(r)
1 point
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.
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.
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
1 point
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
1 point
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?
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
1 point
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:
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
1 point
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