0% found this document useful (0 votes)
125 views5 pages

DBMS Assignment 2

Uploaded by

Jeevitha T
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views5 pages

DBMS Assignment 2

Uploaded by

Jeevitha T
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Wayanamac Education Trust®

DON BOSCO INSTITUTE OF TECHNOLOGY


Kumbalagodu, Mysuru Road, Bengaluru – 560074
www.dbit.co.in Ph: +91-80-28437028 / 29 / 30 Fax: +91-80-28437031
Department of Information Science & Engineering

ASSIGNMENT- 2
Course Name with Code: Database Management System with 18CS53 Academic year: 22-23

Semester: 5th Sem Date of Given: 13-12-2022 Date of Submission: 22-12-2022 Max Marks: 10
SI.No Questions CO RBTL
Group-1
1 Define referential integrity constraint. Explain the importance of 2
referential integrity constraint. How is this constraint implemented in 1
SQL
2 Discuss the characteristics of a relation, with an example 2 1
3 2
Briefly discuss the different types of update operations on relational
database. show an example of a violation of referential integrity in each 2
of the update operation

4 Consider the following scheme for a company database 3

Employee(Fname, Lname, Ssn, Address, Super-ssn, Salary, Dno)


Department( Dname, Dnumber, Mgr- ssn, Mgr-start-date)
Dept-Locations( Dnumber, Dlocation)
Project( Pname, Pnumber, Plocation, Dnum)
Works-On( Essn, Pno, Hours)
Dependent( Essn, Dependent-name, Sex, Bdate, Relationship)
Write the SQL query for the following 3
i) List the names of managers who have at least one dependent
ii) Retrieve the list of employess and the projects they are
working on, ordered by department and within each
department, ordered alphabetically by last name, first name
iii) For each project, retrieve the project number, the project name,
and the number of employess who work on that project.
iv) For each project on which more than two employees who work
, retrieve the project number, the project name, and the number
of employess who work on the project.
v) For each project, retrieve the project number, the project name,
and the number of employess from department 4 who work on
the project
5 Discuss how Nulls are treated in comparison operatorsin SQL. How are 3 2
Nulls treated when aggregate functions are applied in an SQL query?
Wayanamac Education Trust®
DON BOSCO INSTITUTE OF TECHNOLOGY
Kumbalagodu, Mysuru Road, Bengaluru – 560074
www.dbit.co.in Ph: +91-80-28437028 / 29 / 30 Fax: +91-80-28437031
Department of Information Science & Engineering

How are Nulls treated if they exist in grouping attributes?


6 Explain Drop Command with an example 3 2
Group-2
7 Discuss various types of Inner Join Operations and Division Operations? 2 1
8 2 2
Explain different types of unary operators in relational algebra
9 2 2
Explain different types of constraints in relational algebra
10 Consider the following tables: 3

Works( Pname, Cname, Salary)


Lives( Pname, Street, City)
Located-in( Cname, City)
Manager( Pname, Mgrname)
Write the SQL query for the following 3
i) Find the names of all persons who live in the city ‘mumbai’
ii) Retrieve the names of all person of ‘infosys’ whose salary is
between Rs 30,000 and Rs 50,000
iii) Find the names of all persons who live and work in the same
city
iv) List the names of the people who work for ‘Wipro’ along with
cities they live in
v) Find the average salary of all ‘Infosyians’

11 Describe the six clauses in the syntax of an SQL retrieval query. Show 3
what type of constructs can be specified in each of the six clauses. Which 2
of the six clauses are required and which are optional?
12 Write a note on: 3

i) Views in SQL 1
ii) Aggregate functions in SQL
iii) Drop Command
Group-3
13 2
Explain the process of relational database design using E-R to relational 2
mapping
14 2 2
Explain different types of binary operators in relational algebra
15 2 2
Explain various types of outer join operations
Wayanamac Education Trust®
DON BOSCO INSTITUTE OF TECHNOLOGY
Kumbalagodu, Mysuru Road, Bengaluru – 560074
www.dbit.co.in Ph: +91-80-28437028 / 29 / 30 Fax: +91-80-28437031
Department of Information Science & Engineering

16 Consider the following schema 3


Sailors( sid, sname, rating, age)
Boats( bid, bname, color)
Reserves( sid, bid, day)
Write the SQL query for the following
i) Retrieve the sailors name who have reserved red and green 3
boats.
ii) Retrieve the sailors names with age over 20 years and reserved
black boat
iii) Retrieve the number of boats which are not reserved.
iv) Retrieve the sailors names who have reserved green boat on
Monday
v) Retrieve the sailors names who is oldest sailor with rating 10
17 Describe conceptually how an SQL retrieval query will be executed by 3
2
specifying the conceptual order of executing each of the six clauses.
18 Explain insert, delete and update statements in SQL and give example foe 3
2
each
Group-4

19 2 2
Explain Additional Relational operations with an example.
20 2 3
Queries in Relational Algebra(7 Queries).
21 2 3
Basic Retrieval Queries in SQL
22 Consider the following schema and write the SQL queries 3 3
Students( Sid, Sname, Major, GPA)
Faculty( Faculty_id, Fname, Dept, Designation, Salary)
Course( Course_id, Cname, Faculty_id)
Enroll( Course_id, Sid, Grade)
Write the SQL query for the following

i) Retrieve the student name who is studying under faculties of


“Mechanical dept”
ii) Retrieve the student name who have enrolled under any of the
course in which ‘kumar’ has enrolled
iii) Retrieve the faculty name who earn salary which is greater
than the average salary of all the faculties.
iv) Retrieve the sname who are not been taught by faculty ‘kumar’
v) Retrieve the faculty names who are assistant professors of CSE
Wayanamac Education Trust®
DON BOSCO INSTITUTE OF TECHNOLOGY
Kumbalagodu, Mysuru Road, Bengaluru – 560074
www.dbit.co.in Ph: +91-80-28437028 / 29 / 30 Fax: +91-80-28437031
Department of Information Science & Engineering

3dept.

23 Explain how the Group-By Clause works. What is the difference between 3
2
the Where and Having Clause
24 How are triggers and assertions defined in SQL? Explain 3 2

Course Coordinator Name HoD


Wayanamac Education Trust®
DON BOSCO INSTITUTE OF TECHNOLOGY
Kumbalagodu, Mysuru Road, Bengaluru – 560074
www.dbit.co.in Ph: +91-80-28437028 / 29 / 30 Fax: +91-80-28437031
Department of Information Science & Engineering

You might also like