Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (1 vote)
300 views

DBMS Assignment

The document provides details about three assignments involving relational database schemas. Assignment 1 describes an employee database and asks questions about finding employee names, cities, addresses, and salaries. Assignment 2 asks to modify data in the employee database. Assignment 3 describes a sailors database and poses questions about finding sailor names and details based on boat reservations and attributes.

Uploaded by

Aman Verma
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
300 views

DBMS Assignment

The document provides details about three assignments involving relational database schemas. Assignment 1 describes an employee database and asks questions about finding employee names, cities, addresses, and salaries. Assignment 2 asks to modify data in the employee database. Assignment 3 describes a sailors database and poses questions about finding sailor names and details based on boat reservations and attributes.

Uploaded by

Aman Verma
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

DBMS Assignment Questions Prof.

O P Vyas employee (employee-name, street, city) works (employee-name, company-name, salary) company (company-name, city) manages (employee-name, manager-name) Figure 01: Employee Database Schema Assignment #1 Consider the employee database of Figure 01, where the primary keys are underlined. Give an expression in SQL for each of the following queries. a) Find the names of all employees who work for First Bank Corporation. b) Find the names and cities of residence of all employees who work for First Bank Corporation. c) Find the names, street addresses, and cities of residence of all employees who work for First Bank Corporation and earn more than $10,000. d) Find all employees in the database who live in the same cities as the companies for which they work. Assignment #2 Consider the relational database of Figure 01. Give an expression in SQL for each of the following queries. a) Modify the database so that Jones now lives in Newtown. b) Give all employees of First Bank Corporation a 10 percent raise. c) Give all managers of First Bank Corporation a 10 percent raise. d) Give all managers of First Bank Corporation a 10 percent raise unless the salary becomes greater than $100,000; in such cases, give only a 3 percent raise.
Sailors(sid, sname, rating, age) Boats(bid, bname, color) Reserves(sid, bid, day)

Figure 02: Sailors Database Schema Assignment #3 Consider the relational database of Figure 02. Give an expression in SQL for each of the following queries. a) Find the names of sailors who have reserved boat number 103. b) Find sailors whose rating is better than some sailor called Horatio. c) Find the names of sailors who have reserved a red boat.

You might also like