Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Anna University: Chennai - 600 025

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

www.Vidyarthiplus.

com

ANNA UNIVERSITY: CHENNAI – 600 025

B.E/ B.TECH DEGREE EXAMINATIONS, NOV/DEC-2014

REGULATION – 2013

THIRD SEMESTER

(B.E – Computer Science and Engineering)

CS6312- DATABASE MANAGEMENT LABORATORY

Time : 3 Hours Maximum Marks :100

1. Create the following tables with the mapping given below.


a. stu_details (reg_no, stu_name, DOB, address, city)
b. mark_details (reg_no, mark1, mark2, mark3, total)
(i) Alter the table mark_details to add a column average with data type as long.
(ii) Display the months between the DOB and till date.
(iii) Using alter command drop the column address from the table stu_details.
(iv) Write a pl/sql program to find the sum &avg marks of all the student using procedures.
(v) Design and implement payroll system to insert data's in DB and update Data’s in DB using
VB as front end and Ms-Access as back end.
Marks:
Table creation and Data Insertion (15) marks
Appropriate Constraints and Data Type (15) marks
Queries (i-iii) (10 x 3=30) marks
Procedure (iv) (20) marks
DB,VB&Ms-Access(v) (20) marks

2. Create the following tables with the mapping given below.


a. emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no, salary).
b. dept_details (dept_no, dept_name, location).
(i) Display the months between the doj and till date.
(ii) Alter the table emp_details to add a primary key constraint on emp_no.
(iii)Write a pl/sql program to display the salary of a particular employee using functions.
(iv) Design and implement library information system to insert data's in DB and update
Data’s in DB using VB/Java as front end and Ms-Access as back end
Marks:
Table creation and Data Insertion (15) marks
Appropriate Constraints and Data Type (15) marks
Queries (i-ii) (15 x 2=30) marks
Functions (iii) (20) marks
DB,VB&Ms-Access(iv)(20) marks

www.Vidyarthiplus.com
www.Vidyarthiplus.com

3. I. Create the following tables with the mapping given below.


a. emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no, salary).
b. dept_details (dept_no, dept_name, location).
(i). Create a view emp1 from emp_details such that it contains only emp_no and
emp_name.
(ii) Select dept_no from dept_details and not in emp_details using both the tables.
II. Create a table named as student and insert values into the table.
III. Create the following table with the mapping given below.
Book(book_name,author,price,quantity).
(iii)Write a query to update the quantity by double in the table book.
Marks:

Table creation and Data Insertion (I,II,III) (10+20+10=40) marks

Appropriate Constraints and Data Type(I,II,III) (15) marks

Queries (i-ii) (15 x 2=30) marks

Query (iii) (15) marks

4. Create the following tables with the mapping given below.

a. stu_details (reg_no, stu_name, DOB, address, city)

b. mark_details (reg_no, mark1, mark2, mark3, total)

(i). Display only those rows whose total ranges between 250 and 300.

(ii). Drop the table mark_details.

(iii). Delete the row whose reg_no=161.

(iv). Display all details whose names begins with 'a'.

Marks:

Table creation and Data Insertion (20) marks

Appropriate Constraints and Data Type (20) marks

Queries (i-iv) (15 x 4=60) marks

www.Vidyarthiplus.com
www.Vidyarthiplus.com

5.Create the following tables with the mapping given below.

a. emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no, salary).

b. dept_details (dept_no, dept_name, location).

(i) Truncate the table dept_details.

(ii) Display the structure of the table emp_details.

(iii) Convert the first letter of emp_name into capitals.

(iv) Display the emp_namegetting highest salary.

Marks:

Table creation and Data Insertion (20) marks

Appropriate Constraints and Data Type (20) marks

Queries (i-iv) (15 x 4=60) marks

6. Create the following tables with the mapping given below.

a. book (book_name,author,price,quantity).

b. customer (Cust_id, Cust_name, Addr, ph_no,pan_no)


(i) Truncate the table customer.

(ii) List the author of the book which one have the price of 200.

(iii).List the price of the book which one is between the price of 175 & 250.

(iv).Retrieve all the details from the table book whose author name start with K.

II.Write a pl/sql program to find the largest of two numbers.

Marks:
Table creation and Data Insertion (20) marks
Appropriate Constraints and Data Type (15) marks
Queries (i-iv) (10 x 4=40) marks
PL/SQL program(II) (25) marks

www.Vidyarthiplus.com
www.Vidyarthiplus.com

7. Create the following tables with the mapping given below.

a. stu_details (reg_no, stu_name, DOB, address, city)

b. mark_details (reg_no, mark1, mark2, mark3, total)

(i)Find out the name of all students.

(ii)List all the student detail that who are all located in Chennai.

(iii) Drop the table mark_details.

(iv)Write a pl/sqlprogram to find the address of a particular student using functions.

(v)Design Student Details from the tableusing Front end tool.

Marks:

Table creation and Data Insertion (15) marks


Appropriate Constraints and Data Type (15) marks
Queries (i-iii) (10 x 3=30) marks
PL/SQL program(iv) (20) marks
Query(v) (20) marks

8. Create the following tables with the mapping given below.

a. Customer (Cust_id, Cust_name, Addr, ph_no,pan_no)

b. Loan (Loan_id, Amount, Interest, Cust_id)

(i)Display the Cust_name having both Loan and Account .

(ii) Display number of Loans, the sum of Loan Amount of a ParticularCustname(“LEENA”)

(iii)Display the Custname doesn’t hold any Account nor taken any Loan

(iv)Add a column nol(number of loans)

(v)Design a Report for Banking Process.


Marks:
Table creation and Data Insertion (15) marks
Appropriate Constraints and Data Type (15) marks
Queries (i-iv) (10 x 4=40) marks
Query(v) (30) marks

www.Vidyarthiplus.com
www.Vidyarthiplus.com

9. Create the following tables with the mapping given below.

a. emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no, salary).


b. dept_details (dept_no, dept_name, location).

(i)Select dept_no from dept_details and not in emp_details using both the tables.
(ii) Create a table named as student and insert values into the table.
(iii) Write a pl/sql program to display the salary of a particular employee using functions.
(iv)Write PL/SQL Program to generate even numbers.
Marks:

Table creation and Data Insertion (15) marks

Appropriate Constraints and Data Type (15) marks

Queries (i-ii) (15 x 2=30) marks

Queries(iii-iv) (20x2=40) marks

10. Create the following tables with the mapping given below.
Phone_book(ph_no,name,door_no,street,place).

(i)Display all names along withph_no.


(ii)Add a column pin_no.
(iii)Write a pl/sql program to find the address of a particular customer using functions.
(iv)Write a pl/sql program to find the factorial of a given number using functions.

Marks:

Table creation and Data Insertion (15) marks

Appropriate Constraints and Data Type (15) marks

Queries (i-ii) (15 x 2=30) marks

PL/SQL program (iii-iv) (20x2=40) marks

www.Vidyarthiplus.com
www.Vidyarthiplus.com

11. Create the following tables with the mapping given below.
emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, salary).

(i)Add a column dept_no(department number).

(ii)Drop the column salary by altering the table.

(iii)Rename the table as’Employee’.

(iv) Write a PL/SQL program to find the greatest of 3 numbers.

(v) Design Employee Details Form using Front end tool.

Marks:

Table creation and Data Insertion (15) marks

Appropriate Constraints and Data Type (15) marks

Queries (i-iii) (10 x 3=30) marks

PL/SQL program(iv) (20) marks

Query (v) (20) marks

12. Create the following table with the mapping given below.

Customer (Cust_id, Cust_name, Addr, ph_no,pan_no).


(i)Delete the row where cust_name=’NANCY’.
(ii)Update the addr where cust_name=’MATHIK’.
(iii)Display the details of a customer named ‘LITHUANA’.
(iv) Write a pl/sql program to swap two numbers.
(v) Write a pl/sql program to find the summation of odd numbers using for loop.
Marks:

Table creation and Data Insertion (15) marks

Appropriate Constraints and Data Type (15) marks

Queries (i-iii) (10 x 3=30) marks

PL/SQL program (iv-v) (20x2=40) marks

www.Vidyarthiplus.com
www.Vidyarthiplus.com

13. Create the following table with the mapping given below.

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_namewhose price is greater than Rs.400.

(iii)Retrieve the list of author_name whose first letter is ’a’ along with the book_name and price.

(iv) Write a pl/sql program to swap two numbers.

(v) Write a pl/sql program to check whether the given number is prime or not.

Marks:

Table creation and Data Insertion (15) marks

Appropriate Constraints and Data Type (15) marks

Queries (i-iii) (10 x 3=30) marks

PL/SQL program (iv-v) (20x2=40) marks

14. Create the following table with the mapping given below.

a. stu_details (reg_no, stu_name, DOB, address, city)

b. mark_details (reg_no, mark1, mark2, mark3, total)

(i) Find the name of the student whose reg_no is’107’.

(ii)Display the details of a particular student whose name is ‘MATHU’.

(iii)Rename the table mark_details as ’academics’.

(iv)Write a pl/sql program to find the sum &avg marks of all the student using procedures.

(v)Write a pl/sql program to check whether the given number is prime or not.

Marks:

Table creation and Data Insertion (15) marks

Appropriate Constraints and Data Type (15) marks

Queries (i-iii) (10 x 3=30) marks

PL/SQL program (iv-v) (20x2=40) marks

www.Vidyarthiplus.com
www.Vidyarthiplus.com

15. Create the following tables with the mapping given below.

a. assessment(reg_no,name, mark1, mark2, mark3, total)


b.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 program to find the sum &avg marks of all the student using procedures.

(v)Design a Report for Student Details.

Marks:

Table creation and Data Insertion (15) marks

Appropriate Constraints and Data Type (15) marks

Queries (i-iii) (10 x 3=30) marks

PL/SQL program(iv) (20) marks

Query (v) (20) marks

16. Create the following tables with the mapping given below.

a. emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no, salary).


b. dept_details (dept_no, dept_name, location).
(i)Select dept_no from dept_details and not in emp_details using both the tables.
(ii)Display the structure of the table emp_details.
(iii)Display the emp_namegetting highest salary
(iv)Creating Trigger On Table Employ For Not Allowing Insert/Update/Delete Operations On
Friday.
(v)Design and implement payroll system to insert data's in DB and delete Data from DB using VB
as front end and Ms-Access as back end.
Marks:
Table creation and Data Insertion (15) marks
Appropriate Constraints and Data Type (15) marks
Queries (i-iii) (10 x 3=30) marks
Trigger(iv) (20) marks
DB,VB&Ms-Access(v) (20) marks

www.Vidyarthiplus.com
www.Vidyarthiplus.com

17.Create the following tables with the mapping given below.

Phone_book(ph_no,name,door_no,street,place).
(i)List the price of the book which one is between the price of 400 & 500.

(ii)Creating Trigger To Insert Values To Another Table.

(iii)Write a pl/sql program to find the factorial of a given number.


(iv)Design and implement payroll system to insert data's in DB and delete Data from DB using

VB as front end and Ms-Access as back end.

Marks:
Table creation and Data Insertion (15) marks
Appropriate Constraints and Data Type (15) marks
Queries (i) (10) marks
Trigger(ii) (20) marks
PL/SQL program(iii) (20) marks
DB,VB&Ms-Access(iv) (20) marks

18. Create the following table with the mapping given below.
retailor(Cust_id, Cust_name, place, ph_no,pan_no).
(i) Alter the table to add a column pin_no.
(ii) Display the details of customer who are all living in bangalore.
(iii) Display the customer name whose first letter is ‘M’.
(iv) Write a pl/sql program in procedure using in & out parameter.
(v) Design Customer Details Form using Front end tool.

Marks:
Table creation and Data Insertion (15) marks
Appropriate Constraints and Data Type (15) marks
Queries (i-iii) (10 x 3=30) marks
Trigger(iv) (20) marks
Front end tool(v) (20) marks

www.Vidyarthiplus.com
www.Vidyarthiplus.com

19. Create the following table with the mapping given below.

a.Product_master(product_name,purchase_prize,sell_prize,profit,quantity,balance)

b. Customer (Cust_id, Cust_name, Addr, ph_no,pan_no).


(i)Display all the customer names along with their address.

(ii)Drop the table customer.

(iii) Change thesell_price to 5000&purchase_price amount to 4000 for any one of the product in
product_master.

(iv) Create a trigger to update the balance in product_ master table whenever transaction table will
have a new entry.

(v) Design and implement payroll system to insert data's in DB and update Data’s in DB using
VB/Java as front end and Ms-Access as back end.

Marks:
Table creation and Data Insertion (15) marks
Appropriate Constraints and Data Type (15) marks
Queries (i-iii) (10 x 3=30) marks
Trigger(iv) (20) marks
MS Access(v) (20) marks
20. Create the following table with the mapping given below.
a. stu_details (reg_no, stu_name, DOB, address, city)
b. mark_details (reg_no, mark1, mark2, mark3, total)

(i)Find out the name of all students along with their total marks.
(ii)Change the mark1 as ‘78’ from ‘59’ and alter the total for a particular student.
(iii) Delete all the records and its memory space from the table student.
(iv) Write a pl/sql program to check whether the given number is prime or not.
(v) Design Student Details Form using Front end tool.
Marks:
Table creation and Data Insertion (15) marks
Appropriate Constraints and Data Type (15) marks
Queries (i-iii) (10 x 3=30) marks
PL/SQL program (iv) (20) marks
Front end tool(v) (20) marks

www.Vidyarthiplus.com
www.Vidyarthiplus.com

21. Create the following table with the mapping given below.
a.Administration(employee_salary, development _cost, fund_amount, turn_over,bonus)
b. Emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no, salary).
(i)Calculate the total and average salary amount of the administration table.

(ii)Display total salary spent for employees.

(iii)Display total fundamount.

(iv)write a pl/sql code block to calculate the area & circumference of a circle

(v)Design Arithmetic Operations Form using Front end tool.

Marks:
Table creation and Data Insertion (15) marks
Appropriate Constraints and Data Type (15) marks
Queries (i-iii) (10 x 3=30) marks
PL/SQL program (iv) (20) marks
Front end tool(v) (20) marks

22. Create the following table with the mapping given below.
emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no, salary).
(i)List all employees which starts with either B or C.

(ii)Display the names and dob of all employees who were born in Feburary.

(iii)List out the employee names whose salary is greater than 15000.

(iv)Write a pl/sql program to find the sum of 1-100 numbers.

(v)Design a Menu Editor in Visual Basic.

Marks:
Table creation and Data Insertion (15) marks
Appropriate Constraints and Data Type (15) marks
Queries (i-iii) (10 x 3=30) marks
PL/SQL program (iv) (20) marks
Visual basic(v) (20) marks

www.Vidyarthiplus.com
www.Vidyarthiplus.com

23.Create the following tables with the mapping given below.

a. Customer (Cust_id, Cust_name, Addr, ph_no,pan_no)

b. Loan (Loan_id, Amount, Interest, Cust_id,branch)

(i)Display the entire loan relation in descending order of the amount.

(ii)Find the names of all branches in loan relation.

(iii)Find all customer id's for loan's with loan amount between 5000 and 15000.

(iv)write a pl/sql code to accept the text and check the text is palindrome or not.

(v)Design a Report for Banking Process.

Marks:
Table creation and Data Insertion (15) marks

Appropriate Constraints and Data Type (15) marks

Queries (i-iii) (10 x 3=30) marks

PL/SQL program (iv) (20) marks

Report(v) (20) marks

24.Create the following table with the mapping given below.

book(book_name,author_name,price,quantity).

(i)Write a query to find out the minimum quantity of books available in the table book.
(ii)Write a query to find the total price of all the books present in the table.
(iii)Write a query to find the average amount of all the books.
(iv)Write a pl/sql program to generate numbers from 0 to 25 in step of 5
(v)Data’s in DB using VB/Java as front end and Ms-Access as back end.

Marks:
Table creation and Data Insertion (15) marks
Appropriate Constraints and Data Type (15) marks
Queries (i-iii) (10 x 3=30) marks
PL/SQL program (iv) (20) marks
MS-Access (v) (20) marks

www.Vidyarthiplus.com
www.Vidyarthiplus.com

25.Create the following table with the mapping given below.

Product_master(product_name,product_no,purchase_prize,sell_prize,profit,quantity,balance)

(i)Change the purchase_prize into 551 for the product_no pd3.

(ii)Delete all products from product_master where the Quantity is equal to 40.

(iii)Find the product no & product name of the product which have a purchase amount equal to
Rs.5500.

(iv) Write a pl/sql program to find the factorial of a given number using functions.

(v)Design and implement payroll system to insert data's in DB and delete Data from DB using VB

as front end and Ms-Access as back end.

Marks:
Table creation and Data Insertion (15) marks
Appropriate Constraints and Data Type (15) marks
Queries (i-iii) (10 x 3=30) marks
PL/SQL program (iv) (20) marks
MS-Access (v) (20) marks

www.Vidyarthiplus.com

You might also like