CS8481 DBMS Lab QN
CS8481 DBMS Lab QN
(Regulations 2017)
Create the following tables with given attributes having appropriate data type and specify the
1.
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. Handle
Exceptions.
d) Write a function to return the percentage of poll in a booth when boothid is given as input.
Handle Exceptions.
Create the following tables with given attributes having appropriate data type and specify the
7.
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 Form using Menus to
(i) Add a product.
(ii) Delete a product.
Table creation with Appropriate Constraints and Data Type (15)
Data Insertion (15)
Queries (a) (10) marks
(b) & (c) (25) marks
Create the following tables with given attributes having appropriate data type and specify the
8.
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.
Table creation with Appropriate Constraints and Data Type (15)
Data Insertion (15)
Queries (a-b) (20) marks
(c) (15) marks
Design a Database for Library Management System using ER Diagram.
9.
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
(15)
(a) Login form - (10) marks
(b)Form design- (10) marks
Database connectivity & Output (5) Marks
Create an application for student contacts management application. The application enables a faculty
10.
user to login and search the details of a Student (Name, Address, Contact no, Email id, parent contact)
with his register number. Create necessary tables and Forms.
Type (20)
Data Insertion (10)
Queries (a-c) (20) marks
(c) PL/SQL program (15)
Type (15)
Data Insertion (15)
Queries (a-c) (20) marks
(d) PL/SQL program (15)
16.
17. (a) Create a table Student (Regno, name , Mark) and insert records. 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.
18. (a)Write a PL/SQL program to print the payslip of the employee. Create a table Employee (Id,
Name, Basicpay, DOB,Dept).Obtain Employeeid as input from the main program. (Basic pay
+DA+HRA-TAX-DED). Assume the Allowances and Deduction %.
(b) Develop an application for Employee payroll processing System to add, delete, update
employee particulars and generate payslip with the employee table created in (a).
Table creation with Appropriate Constraints and Data
Type (20)
Data Insertion (10)
PL/SQL program (15)
Application Development
Database Design (10)
Front end (5)
Database connectivity and output (5)
19. (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.
Type (20)
Data Insertion (10)
PL/SQL program (15)
Application Development
Database Design (10)
Front end (5)
Database connectivity and output (5)
20. (a) Create the table Book (acc_no, username, bookno, days) and insert few records into the
table. Write a PL/SQL Program to calculate the fine for library book (Rs 5 /day). (Hint: fine
=days*5). Obtain account no as input. Handle Exceptions.
(b). Design a Database schema for Library management System. Develop an application for
managing book details in Library management System .
Table creation with Appropriate Constraints and Data
Type (20)
Data Insertion (10)
PL/SQL program (15)
Application Development
Database Design (10)
Front end (5)
Database connectivity and output (5)