We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 7
LIST OF EXPERIMENTS
Description
Part-A
Consider the following schema for Bank Database:
BRANCH(bid: varchar, bname:string, branch-ci
ACCOUNT (acen:
DEPOSITOR(customer-name:string, aceno:int)
tring, assets:integer)
{, branch-name:string, balance:integer)
CUSTOMER (Cid:varchar, customer-name:string, customer-street::
LOAN(loan-numbe
Write SQL queries to
tring, customer-city:string)
{, branch-name:string, amountzinteger, cid:varchar)
1. Find all the customers who have at least one account at the “Mangaluru” branch.
2.Find all the customers who have an account at all the branches located in a specific city.
3.Retrieve the Customer name and Joan amount of a customer who borrowed a\loan more than
5,00,000.
4.Retrieve the details of bank branch with maximum assets.§.Demonstrate how you delete all account tuples at every branch located in a specific cityConsider the following schema for a Library Database:
BOOK Book id:varchar, Title:string, Publisher Name:string, Pub_Year:integer)
BOOK_AUTHORS@®ook id:varchar, Author_Name:string)
PUBLISHER (Name:string, Address:string, Phone:integer)
BOOK_COPIES(Book i
BOOK_LENDING(Book i
Due_Date:date)
LIBRARY_PROGRAMME(Programme.id:varchar, Programme 1
Write SQL queries to {
varchar, Programme_id:varchar, No-of Copies:integer)
:varchar, Programme_id:varchar, Card_No:varchar, Date Out:date,
‘ame:string, Address:
1g)
1 Retrieve details of all books in the library ~ id, title. name of publisher. authors. number of copies
in each Programme. ete. tad
2.Get the particulars of borrowers who have borrowed more than 3 books. but from Jan 2023 to Jun
2023
3.Delete a book in BOOK table. Update tlie contents of other tables to reflect this data manipulation
operation.
4.Partition the BOOK table based on. year of publication, Demonstrate its working with a simple
query.
| Create a view of all books and its number of copies that are currently available in the LibraryConsider the schema for College Database:
STUDE!
SEMSEC(SSID, Sem, Sec)
CLASS(USN, SSID)
COURSE (Subcode, Title, Sem, Credits)
IAMARKS(USN, Subcode, SSID, Test, Test2, Test3, FinallA)
Write SQL queries to
1 List all the student details studying in fourth semester ,C* section.
2.Compute the total number of male and female students in each semester and in each section.
3.Create a view of Test! marks of student USN “4SF20CD001” in all Courses.
IA. (average of three test! marks) and update the corresponding table for all
'T(USN, SName, Address, Phone, Gender)
5.Categorize students based on the following criterion:
If Final = 45 to 50 then CAT = “Outstanding!
If FinallA= 40 to 45 then CAT= “Good”
If FinalfA = 30 to 40 then CAT
If FinalLA< 30 then CAT =""Weak”
Give these details only for 8th semester A, B. and C section students.| Consider the schema for Company Database:EMPLOYEE: (Hid:varchar,. Name:string,.. Address:- string, Gender:string,. Salary: integer,
‘SuperEid: varchar, Duo: varchar)
DEPARTMENT (Daum: varchar, Dname: string, DMgr_id:varchar, Mgr_start_date: date)
DLOCATION (Duo: varchar, Dlocation:string)
PROJECT (Pnum:varchar, Pname: string, Plocation:string, Dno:varchar )
WORKS_ON
: varchar, Pno: varchar, Hours: integer)
DEPENDENT = (Empid: —_varehar,
Relationship:String)
Write SQL queries to
Dep_name:string, Gender:string, _Bdate:date,
1. Makea list of all project numbers for projects that involve an employee whose name is “Rahul”
cither as a worker or as a manager of the department that controls the project.
2. Shbw the resulting salaries if every employee working on the “IoT” project is given a 10 percent
raise.
3. Find the sum of the salaries of all employees of the “Accounts” department. as well as the
maximum salary, the minimum salary, and the average salary in this department.
4
Retrieve the name of each employee who works on all the projects controlled by department
number 5 (use NOT EXISTS operator).
Create a view Dept_info that gives details of department name. Number of employees and total salary of
each department.Consider the schema for Airline Database:
Note:
Flights (fno: varchar, from: string, to: string, distance: integer, departs: time, arrives: time,
price: integer)
Aireraft (:
Certified (eid: varchar, aid: varchar)
archar, aname: string, cruisingrange: integer)
varchar, ename: string, salary: integer)
‘The Employees relation describes pilots and other kinds of empl
Every pilot is
ees as wel
certified for some aircraft. and only pilots are certified to fly.
Write
1
4,
Find tl
SQL queries to
Find the names of aircraft such that all pilots certified to operate them have salaries more than
Rs.80, 000,
For each pilot who is certified for more than three aircrafts. find the eid and the maximum
cruisingrange of the aircraft for which she or he is certified.
Find the names of pilots whose salary is less than the price of the cheapest route from Bengaluru
to Mumbai }
Find the aids of all aircraft that can be used on routes from Bengaluru to New Delhi
he employee name and salary earning second highest salary