Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Page 1 of 6

B.E / B.Tech / B.Arch PRACTICAL END SEMESTER EXAMINATIONS, AUGUST 2021


Fourth Semester

CS8481 & DATA BASE MANAGEMENT SYSTEMS LABORATORY

(Regulations 2017)

Time : 3 Hours Max. Marks 100

Date: 5.8.2021(FN)

AIM & QUERIES & OUTPUT &


MCQ VIVA RECORD TOTAL
PROCEDURE PROGRAM RESULT

20 35 10 15 10 10 100

Create the following tables with given attributes having appropriate data type and specify the
001.
necessary primary and foreign key constraints:
Customer (Custid, Custname, Age, phone)
Loan (Loanid, Amount, Custid, EMI)
a) List the name of the customers who have taken loan for more than Rs.50,000.
b) List the Customer id of those who have no loan.
c) List the total count of loan availed.
d) Create a procedure to print the Amount and Custid when the Loanid is given as input.

Create the following tables with given attributes having appropriate data type and specify the
002.
necessary primary and foreign key constraints:
Employee (EmpId, Empname, Sal, Deptno)
Dept (Deptno, Dname, Loc,DeptmanagerId)
a) List the count of Employees and average salary of each department.
b) List the employee name, department name and the salary of all the employees.
c) Display the Employee name and the respective department manager name.
d) Create a function to return the salary of the employee when Empid is given as input parameter.

Create the following tables with given attributes having appropriate data type and specify the
003.
necessary primary and foreign key constraints:
Voter (VoterId, Votername, Gender, Boothid,Checkvote) checkvote is 1(voted) or 0 (not voted)
Booth (Boothid, Location,BIncharge )
a) (i)List the count of voters in each Booth (ii) List the count of Male voters voted.
b) Display the overall count of voters voted in the election.
c) Display the Boothid, Location and count of voters voted.

d) Write a function to return the percentage of poll in a booth when boothid is given as input.
Page 2 of 6

Create the following tables with given attributes having appropriate data type and specify the
004.
necessary primary and foreign key constraints:
User (Userid, Name, Dept, Bookid, Accdate)
Book (Bookid, Book_name, Author, Publication, Price)
a) List the name of the user who had accessed the costliest book.
b) List the userid and count of books accessed by the user.
c) List the books published by Wiley publisher.
d) Write a PL/SQL program to print the details of the book when Bookid is given as input..

Create the following tables with given attributes having appropriate data type and specify the
005.
necessary primary and foreign key constraints:
Customer (Custid, Custname, Addr, phno,panno)
Loan (Loanid, Amount, Interest, Custid)
Account (Acctno, Accbal, Custid)
a. Display the Account balance amount of a particular customer “ARUN”
b. Update the interest with 1% when Accbal of the Custid >50% of Loan Amount
c. Create a View with Accbal and Loan Amount of all Customers
d. Create a trigger which checks for minimum balance in the account.
Create the following tables with given attributes having appropriate data type and specify the
006.
necessary primary and foreign key constraints:
Customer (Custid, Custname, phno,pan,DOB)
HomeLoan (HLoanid, Amount, Custid)
VehicleLoan (VLoanid, Amount, Custid)
a) List the Custid of the customers who have both homeloan and vehicle loan.
b) List the Custid of the customers who donot have any loan.
c) Create a view with customerid, Customer name and total loan amount (HomeLoan and
VehicleLoan)
d) Write a trigger which displays the Homeloan details whenever the values are inserted in the
respective table.

Create the following tables with given attributes having appropriate data type and specify the
007.
necessary primary and foreign key constraints:
Product (Prodid, Prodesc, Price, Stock)
Sales (Salesid, Prodid, qty)
a) Add a column reorder in Product table having value 50 for all products.
b) Create a Login form to validate a user.
c) Create a VB Form using Menus to
(i) Add a product. (ii) Delete a product.
Page 3 of 6

Create the following tables with given attributes having appropriate data type and specify the
008.
necessary primary and foreign key constraints:
Product (Prodid, Prodesc, Price, Stock)
Sales (Salesid, Prodid, qty)
a) Add a column reorder in Product table having value 50 for all products.
b) Display the Sales Report.
c) Create an application for
i) User Login &
ii) checking the availability of a product in a stock.
Design a Database for Library Management System using ER Diagram.
009.
Create the following table with the given attributes having appropriate data type and specify the necessary
key constraints.
 BOOK(Bookcode,Name,Author,Price,Publish)
Design forms to
a) Login
b) Add & delete book details
1. Create a table as book (sl.no, book_name, author_name,price, edition,publisher_name ).
010.
Perform the following operations:
a) Insert minimum ten tuples in book table
b) Commit the table book
c) Create a save point for the table book as B
d) Rollback the table book after inserting 4 & 5 row
e) Define Grant & Revoke
2. Design an application for Library Management System and Show the database
connectivity details using suitable Front End Tool.

Create a database for maintaining the cloud database


011.
PAAS_details(server, platform, startDate, endDate, rate)
SAAS_details(server, software, startDate, endDate, rate)
DAAS_details(server, database, startDate, endDate, rate)
transaction(service, logintime, logouttime)
i. List the details of the services requested from 5th Feb to 10th Feb, 2019.
ii. Display the details of the service that are least used and most used.
iii. Develop a PL/SQL function that returns the total amount invested on platform service in the
month of February.
Create the following tables with given attributes having appropriate data type and specify the
012.
necessary primary and foreign key constraints:
Marks(Regno,Name , Dept, Subj1,Subj2,Subj3)
a) Add a column Total in student table and update the Total field with the sum of 3
subject Marks.
b) Find the second maximum total in the table.
c) Display the name of the student with maximum total.
d) Write a PL/SQL program to display the report sheet of the students using cursors.
Page 4 of 6

Write the Query statement for the following:


013.
a. Return the login’s user name.
b. Calculate your age using PL/SQL in built function with DOB.
c. Retrieve the word DATA from the String DATABASE.
d. Display the day of the today’s date.
Create the following tables with the mapping given below.
014.
stu_details (reg_no, stu_name, DOB, address, city)
mark_details (reg_no, mark1, mark2, mark3, total)
(a) Alter the table mark_details to add a column average with data type as long.
(b) Display the months between the DOB and till date.
(c) Using alter command drop the column address from the table stu_details.
(d) Write a PL/SQL program to find the sum & average marks of all the student using procedures.
Create the following tables with the mapping given below.
015.
Employee (Empno, Ename, Job, MgrId, DoB, DoJ, Sal, Comm, Deptno)
Department (Dname, Deptno, Dloc)
(a) Display the Emp no, name, salary and experience of each employee ordered by salary
(highest to lowest)
(b) List the names of the employee working for “Marketing” Department.
(c) List the names of the employees born in the current month.
(d) Write a PL/SQL function to display the details of the employee when Employee no given as
input
016. Write the Query statement for the following
a. Create a Student table (Regno, name, dept) and populate with data.
b. Create a view for CSE dept with the details of students of CSE dept.

c. Implement TCL commands with student table.

d.Write a PL/SQL program to find the details of the student when regno is given as input.

017. (a) Create a table Student (Regno, name , Mark) and insert records.
(b)Write a PL/SQL function to print the grade of the Student. Obtain student mark as input from
the main program. Check for the following condition: if the input mark ranges 91-100 then
Grade A, 81-90 then Grade B, 71-80 then Grade C, 60-70 then Grade D and <60 Grade E.
(b) Develop an application for Banking System. Design a Database schema and create necessary
tables and forms.
Page 5 of 6

018. Create a database for Timetable generation using the following tables:
Faculty_details(FacultyID,FacultyName, dept)
Subject_details(Subcode, subtitle, dept, year)
Subject_allocated(Subcode, year, dept,FacultyID)
Timetable(period, timefrom, timeto, Subcode,year,dept)
i. Display the timetable of individual faculty
ii. Display the timetable of each class separately
iii. Display the timetable of particular subject
iv. Develop a PL/SQL procedure that displays individual class timetable .
019. (a) Create a table Bank (acc_no, name, balance) and insert records into the table. Write a
PL/SQL program for the Bank table to notify the user if the account balance is less than 500.
Obtain account no as input. Handle Exceptions.
(b) Develop an application for inventory management System. Design a Database schema and
Create necessary tables and forms.
Create a database for Placement and Training cell.
020.
Stud_details(regno, name, dept, percentage)
Company(companyID,name, noOfVacancy)
Training_Details(CourseID, name, Trainer)
Placed(regno, companyID,minSal)
i i. List the students who are eligible for recruitment in a particular company.
ii ii. Display the student who has been placed with highest salary
iii iii. Develop a PL/SQL exception that provides an alternate for not eligible students.
Consider the Insurance database given below.
021.
PERSON(driver_ID, name, address)
CAR(regno, model,year )
ACCIDENT(report_number,accd_date,location)
OWNS(driver_id,regno)
PARTICIPATED(driver_id,regno,report_number,damage_amount)
i. Specify the primary keys and foreign keys and enter at least five tuples for each relation.
ii. Update the damage amount for the car with specific regno in the accident with report number
1025.
iii. Add a new accident to the database.
iv. Find the total number of people who owned cars that were involved in accidents in the year
2018.
v. Find the number of accidents in which cars belonging Wagon R were involved.

022.
Create the Book database and do the following:
book(book_name,author_name,price,quantity).
i. Write a query to update the quantity by double in the table book.
ii. List all the book_name whose price is greater than those of book named "Database for Dummies".
iii. Retrieve the list of author_name whose first letter is ’a’ along with the book_name and price.
iv.Write a PL/SQL Procedure to find the total number of books of same author.
023.
Create the Company database with the following tables and do the following:
Administration(employee_salary, development _cost, fund_amount, turn_over,bonus)
Emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no, salary).
i. Calculate the total and average salary amount of the employees of each department.
Page 6 of 6

ii. Display total salary spent for employees.


iii. Develop a PL/SQL function to display total fund amount spent by the administration department

Create the student database with the following tables and do the following:
024.
assessment(reg_no,name, mark1, mark2, mark3, total)
dept_details (dept_no, dept_name, location).
i. Using alter command drop the column location from the table dept_details.
ii. Display all dept_name along withdept_no.
iii. Drop the table dept_details.
iv. Write a PL/SQL Trigger to verify the data before insertion on assessment table.
Consider the following Tables for a bus reservation system application:
025.
BUS (ROUTENO, SOURCE, DESTINATION)
PASSENGER (PID, PNAME, DOB, GENDER)
BOOK_TICKET (PID, ROUTENO, JOURNEY_DATE, SEAT_NO)
i. Include constraint that DOB of passenger should be after 2000
ii. Display the passengers who had booked the journey from Mumbai to Chennai on 02-Feb-2019
iii. List the details of passengers who have traveled more than three times on the same route.
iv. Create a View that displays the RouteNo, source, destination and journey_date which moves from
Chennai to Delhi.
v. In the above created procedure, include exceptions to display "No ticket booked on specified date"
for a given journey_date.

Consider the following tables.


026.
SAILOR(sid, sname, rating, age)
BOATS(bid, bname, colour)
RESERVES(sid, bid, day)
i. List the sailors in the descending order of their rating.
ii. List the sailors whose youngest sailor for each rating and who can vote.
iii. List the sailors who have reserved for both ‘RED’ and ‘GREEN’ boats.
iv. Create synonym for sailor table.
v. Create a PL / SQL Function that accepts SID and returns the name of sailor.

Consider the following relations for an order processing application:


027.
CUSTOMER (CID, NAME)
PRODUCT (PCODE, PNAME, UNIT_PRICE)
CUST_ORDER (OCODE, ODATE, CID)
ORDER_PRODUCT (OCODE, PCODE, QTY)
i. Develop a Trigger to ensure the product to be Pen , Eraser, Pencil during insertion
ii. Develop a PL/SQL Function to calculate the total cost of ordered product.
iii. Use Sequence for PCODE insertion in product table

INTERNAL EXAMINER EXTERNAL EXAMINER

You might also like