0% found this document useful (0 votes)
52 views

Assignment 2

This document contains instructions for a database management systems homework assignment. It includes 6 questions across two parts. Part A includes questions about creating a PL/SQL package with functions and procedures, and explaining the purpose of indexing and null values in databases. Part B includes questions about virtual relations, trigger mechanisms for cascading deletes between related tables, and defining several views over a COMPANY database schema.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

Assignment 2

This document contains instructions for a database management systems homework assignment. It includes 6 questions across two parts. Part A includes questions about creating a PL/SQL package with functions and procedures, and explaining the purpose of indexing and null values in databases. Part B includes questions about virtual relations, trigger mechanisms for cascading deletes between related tables, and defining several views over a COMPANY database schema.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

MODEL HOME WORK: 2

School: Department:CSE/IT

Name of the faculty member: Monica Sood Course No: CSE301


Course Title: Database Management System
Class: Term: Section:B1801
Batch:
Max. Marks: Date of Allotment:8-02-2011 Date of Submission:22-02-2011
Part-A
Q. 1 create a package which includes:
a)function to return the square of the number if number is posotive else return an error
code 100
b)procedure to calculate the simple interest by passing the values of principal,rate and
time
Q. 2 List two reasons why null values might be introduced into the database.
Q. 3 “Does indexing play a role in database management system”. Explain your answer
with example.

Part-B
Q. 4 Explain the role of virtual relations in relational database?And how we combine
relations for producing desired information?

Q. 5: Suppose there are two relations r and s, such that the foreign key B of r
references

the primary key A of s. Describe how the trigger mechanism can be used

to implement the on delete cascade option, when a tuple is deleted from s.

Q. 6: Specify the following views in SQL on the COMPANY database schema .

a. A view that has the department name, manager name, and manager salary for every
department.

b. A view that has the employee name, supervisor name, and employee salary for each
employee who works in the ‘Research’ department.

c.A view that has project name, controlling department name, number of employees,
and total hours worked per week on the project for each project.

d.A view that has project name, controlling department name, number of employees,
and total hours worked per week on the project for each project with more than one
employee working on it.

You might also like