Вы находитесь на странице: 1из 3

2019

COMPUTER SCIENCE – HONOURS – PRACTICAL


[3rd Year Test Exam - Vivekananda College, Thakurpukur]
Seventh Paper
(Group – B)
Full Marks – 50 Time- 3 Hours

Candidates are requested to give their answers in their own words as far as practicable

Marks Distribution:
Sessional : 05 marks
Viva – Voce : 10 marks
Experiment : 35 marks

Group B (RDBMS)
Table Creation and
Data insertion : 15 marks
Form Design : 10 marks
Query : 10 marks

(Under 1+1+1 – New System)

Answer any one question from this group

1. Consider the following schema of a relational database:


Customer (cust-id, cust-name, annual- revenue, cust-type)
[annual-revenue defaults to be 10000, cust-type must be among manufacturer, wholesaler,
retailer or distributor]
Truck (truck-no, driver-name)
City (city-name, population)
Shipment (shipment-no, cust-id, weight, truck-no, start-city, destination-city) [start-city &
destination-city both refer to city-name of City table]

Create table through appropriate SQL commands. Define all integrity constraints and enter
sufficient data through user friendly form design. (Design the form for any one of the table
using Data Form Wizard).

Write SQL commands for the following queries:


(i) List driver names who have delivered shipment to every city.
(ii) For which cust-type the shipment is maximum?

2. Consider the following schema of a relational database:


Aircraft (aid, type)
Flights (flno, aid, company)
[company must be among Jet, AI, Kingfisher or Spicejet]
Employees (eid, ename, salary)
Certified (eid, aid)
Schedule (eid, flno, source_city, destination_city, date)

Create table through appropriate SQL commands. Define all integrity constraints and enter
sufficient data through user friendly form design. (Design the form for any one of the table
using ADODC).

Write SQL commands for the following queries:


(i) Give the employee names who have certification on exactly two types of aircrafts.
(ii) Give the company names which has no flight between ‘Goa’ & ‘Bangalore’.
3. Consider the following schema of a relational database:
Employee (empno, emp_name, salary, hiredate) [salary defaults to 10,000]
Department (deptno, dname, city)
Manager (mgrno, deptno, manager_name, salary, hiredate)
Empmgr (empno, mgrno)

Create table through appropriate SQL commands. Define all integrity constraints and enter
sufficient data through user friendly form design. (Design the form for any one of the table
using ADODC).

Write SQL commands for the following queries:


(i) Give the name of the city where maximum employees are located.
(ii) Give the count of employee number who have joined before 31st January.

4. Consider the following schema of a relational database:


Employee (empno, empname, city)
Project (pno, pname)
Part (partno, part_name)
Use (pno, paretno)
Works (empno, pno)

Create table through appropriate SQL commands. Define all integrity constraints and enter
sufficient data through user friendly form design. (Design the form for any one of the table
using Data Form Wizard).

Write SQL commands for the following queries:


(i) Give the employee names who are working in more than one project.
(ii) Give all the project names in which no employee from “Delhi” is working.

5. Consider the following schema of a relational database:


Product (maker, model, type)
PC (model, speed, RAM, hd, cd, price)
Laptop (model, speed, RAM, hd, screen, price)
Printer (model, color, type, price)

Create table through appropriate SQL commands. Define all integrity constraints and enter
sufficient data through user friendly form design. (Design the form for any one of the table
using Data Form Wizard).

Write SQL commands for the following queries:


(i) Find the makers of the PCs with the fastest processor among all those PC’s that have
the smallest amount of RAM.
(ii) Find those hard disk sizes that occur in three or more PC’s.

6. Consider the following schema of a relational database:


Sailors (sid, s_name, rating, age)
Boats (bid, bname, colour) [Colour must be Red, Green and Yellow]
Reverse (sid, bid, day)

Create table through appropriate SQL commands. Define all integrity constraints and enter
sufficient data through user friendly form design. (Design the form for any one of the table
using ADODC).

Write SQL commands for the following queries:


(i) Find the names of sailors who have reserved both a Rd and Yellow boat.
(ii) Find the sailors whose rating is better than Mr. Lal.
7. Consider the following schema of a relational database:
Suppliers (s_no, s_name, status, s_city)
Part (part_no, part_name, colour, weight, city)
Projects (p_no, p_name, p_city)
Shipment (s_no, part_no, p_no, qty)
Create table through appropriate SQL commands. Define all integrity constraints and enter
sufficient data through user friendly form design. (Design the form for any one of the table
using data Form Wizard).

Write SQL commands for the following queries:


(i) Get project numbers for projects supplied entirely by supplier S1.
(ii) Get part numbers for parts that are supplied either by Kolkata or to a
Kolkata Project.

8. Consider the following schema of a relational database:


Branch (branch_name, branch_city, assets)
Customer (customer_name, street, city)
Loan (branch_name,, loan_no, amount) [amount must be less than 1500000]
Borrower (customer_name, loan_no)
Account (branch_name, account_no, balance)
Depositor (customer_name, account_no)

Create table through appropriate SQL commands. Define all integrity constraints and enter
sufficient data through user friendly form design. (Design the form for any one of the table
using ADODC).

Write SQL commands for the following queries:


(i) Give the branch name which has sanctioned maximum number of loans.
(ii) Give the customer names having both loan and account in “Behala” branch.