0% found this document useful (0 votes)
6 views4 pages

Assignement 1

The document outlines Assignment 1 for the KCS 501 Database Management System course, detailing tasks related to database concepts and design. It includes questions on differences between file-processing systems and DBMS, data independence, roles of a database administrator, and relational database design for various scenarios. Additionally, it requires SQL and relational algebra expressions for specific queries related to employee and flight information, along with SQL DDL statements for table creation.

Uploaded by

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

Assignement 1

The document outlines Assignment 1 for the KCS 501 Database Management System course, detailing tasks related to database concepts and design. It includes questions on differences between file-processing systems and DBMS, data independence, roles of a database administrator, and relational database design for various scenarios. Additionally, it requires SQL and relational algebra expressions for specific queries related to employee and flight information, along with SQL DDL statements for table creation.

Uploaded by

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

KCS 501 Database Management System

(July 2024 – December 2024)

Assignment 1

Date of Issue: 24-09-2024 Last of date of Submission: 30-09-2024

Mode of Submission: Offline on Assignment Book / Laboratory


-----------------------------------------------------------------------------------------------------------------------------

1. List and explain four significant differences between a file-processing system and a
DBMS.
2. Explain the difference between physical and logical data independence.
3. What are five main functions of a database administrator?
4. Explain the differences between relation and relation schema.
5. List major steps that you would take in setting up a database for a particular
enterprise.
6. Explain the distinctions among the terms primary key, candidate key, and super key.
7. Design a relational database for examination office of your university. The
information about the students, class, time, room, subject and professors etc. are to
be stored. At the end of the semester each student is awarded a grade for his/her
performance in the class. (Hint. The database consists of several relations. Outline
various key and integrity constraints)
8. Design a database for the accident monitoring system for transport police. A person
may own a car of several brands and a particular vehicle may have encountered with
an accident.
9. Consider following database for an organization that maintains the information about
various employees working for different companies and their managers.

employee (person-name, street, city)


works (person-name, company-name, salary)
company (company-name, city)
manages (person-name, manager-name)

Give an expression in the relational algebra and SQL to express each of the following
queries:

1|Page
a) Find the names of all employees who work for Union Bank.
b) Find the names and cities of residence of all employees who work for State bank.
c) Find the names, street address, and cities of residence of all employees who work
for Union Bank and earn more than USD1000.
d) Find the names of all employees in this database who live in the same city as the
company for which they work.
e) Find the names of all employees who live in the same city and on the same street
as do their managers.
f) Find the names of all employees in this database who do not work for Union
Bank.
g) Find the names of all employees who earn more than every employee of HSBC
Bank.
h) Assume the companies may be located in several cities. Find all companies
located in every city in which HSBC is located.
i) Modify the database so that Jones now lives in Newtown.
j) Give all employees of Union Bank a 10 percent salary raise.
k) Give all managers in this database a 10 percent salary raise.
l) Give all managers in this database a 10 percent salary raise, unless the salary
would be greater than $100,000. In such cases, give only a 3 percent raise.
m) Delete all tuples in the works relation for employees of Union Bank.
n) Find the company with the most employees.
o) Find the company with the smallest payroll.
p) Find those companies whose employees earn a higher salary, on average, than the
average salary at Union Bank.

10. The following relational database keep track of airline/flight information:

Flights ( flno : integer, aid : integer, from : string, to : string, distance : integer,
departs : time, arrives : time, price : real)
Aircraft (aid : integer, aname : string, cruisingrange : integer)
Certified (eid : integer, aid : integer)
Employees (eid : integer, ename : string, salary : integer)

Note that the Employees relation describes pilots and other kinds of employees as
well; every pilot is certified for some aircraft, and only pilots are certified to fly.

2|Page
Give an expression in relational algebra and SQL for following:

a) Find the names of aircraft such that all pilots certified to operate them have
salaries more than $80,000.
b) For each pilot who is certified for more than three aircraft, find the eid and the
maximum cruising range of the aircraft for which she or he is certified.
c) Find the names of pilots whose salary is less than the price of the cheapest
route from Los Angeles to Zurich.
d) For all aircraft with cruising range over 1000 miles, find the name of the
aircraft and the average salary of all pilots certified for this aircraft.
e) Find the names of pilots certified for some Boeing aircraft.
f) Find the aids of all aircraft that can be used on routes from Los Angeles to
Chicago.
g) Identify the routes that can be piloted by every pilot who makes more than
$100,000.
h) Print the names of pilots who can operate planes with cruising range greater
than 3000 miles but are not certified on any Boeing aircraft.
i) A customer wants to travel from San Francisco to New York with no more than
two changes of flight. List the choice of departure times from San Francisco if
the customer wants to arrive in New York by 6p.m.
j) Compute the difference between the average salary of a pilot and the average
salary of all employees (including pilots).
k) Print the name and salary of every non pilot whose salary is more than the
average salary for pilots.
l) Print the names of employees who are certified only on aircrafts with cruising
range longer than 1000 miles.
m) Print the names of employees who are certified only on aircrafts with cruising
range longer than 1000 miles, but on at least two such aircrafts.
n) Print the names of employees who are certified only on aircrafts with cruising
range longer than 1000 miles and who are certified on some Boeing aircraft.

3|Page
SECTION – B ( Laboratory)

Write SQL (DDL) statement to create above tables. Include integrity constraints
wherever required for Q7,Q8,Q9 and Q10.

4|Page

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy