0% found this document useful (0 votes)
6 views

Bsc-III Dbms Lab Question

The document outlines a lab assignment for BSc (CS) students focusing on Database Management Systems (DBMS), with a submission deadline of December 30, 2024. It includes tasks to create and manipulate three different databases related to colleges, admissions, and subjects, along with specific SQL queries to be executed on these databases. Students are required to create tables, insert data, and perform various queries to extract information based on given criteria.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Bsc-III Dbms Lab Question

The document outlines a lab assignment for BSc (CS) students focusing on Database Management Systems (DBMS), with a submission deadline of December 30, 2024. It includes tasks to create and manipulate three different databases related to colleges, admissions, and subjects, along with specific SQL queries to be executed on these databases. Students are required to create tables, insert data, and perform various queries to extract information based on given criteria.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

LAB ASSIGNMENT

BSc (CS) – III Year


Subject : DBMS (Software)
Submission Deadline : 30-12-2024

1. Using the following database:

1) Colleges (cname, city, address, phone, afdate)


2) Staffs (sid, sname, saddress, contacts)
3) StaffJoins (sid, cname, dept, DOJ, post, salary)
4) Teachings (sid, class, paperid, fsession, tsession)
5) Subjects (paperid, subject, paperno, pape name)

Write SQL statements for the following -

1. Create the above tables with the given specifications and constraints.
2. Insert about 10 rows as are appropriate to solve the following queries.
3. List the names of the teachers teaching computer subjects.
4. List the names and cities of all staff working in your college.
5. List the names and cities of all staff working in your college who earn more than15,000
6. Find the staffs whose names start with 'M' or 'R' and ends with 'A' and/or 7 characters
long.
7. Find the staffs whose date of joining is2005.
8. Find the colleges who have most number of staffs.
9. Find the staffs that earn a higher salary who earn greater than average salary of their
college.
10. Find the college that has the smallest payroll.
11. Find the colleges where the total salary is greater than the average salary of all colleges.
12. List maximum, average, minimum salary of each college
13. List the names of the teachers, departments teaching in more than one department.
14. Find all staff that do not work in same cities as the colleges they work.
15. List names of employees in ascending order according to salary who are working in your
college or all colleges.

2. Create the following database:

1) Enrollment (enrollno, name, gender, DOB, address, phone)


2) Admission (admno, enrollno, course, yearsem, date, cname)
3) Colleges (cname, city, address, phone, afdate)
4) FeeStructure (course, yearsem, fee)
5) Payment (billno, admno, amount, pdate, purpose)

Write SQL statements for the following -

1. Create the above tables with the given specifications and constraints.
2. Insert about 10 rows as are appropriate to solve the following queries.
3. Get full detail of all students who took admission this year class wise
4. Get detail of students who took admission in Bhilai colleges.
5. Calculate the total amount of fees collected in this session
i) By your college ii) by each college iii) by all colleges
6. List the students who have not payed full fee
i) in your college ii) in all colleges
7. List the number of admissions in your class in every year.
8. List the students in the session who are not in the colleges in the same city as they live in.
9. List the students in colleges in your city and also live in your city.

3. Create the following database:

1) Subjects (paperid, subject, paper, papername)


2) Test (paperid, date, time, max, min)
3) Score (rollno, paperid, marks, attendence)
4) Students (admno, rollno, class, yearsem)

Write SQL statements for the following -

1. Create the above tables with the given specifications and constraints.
2. Insert about 10 rows as are appropriate to solve the following queries.
3. List the students who were present in a paper of a subject.
4. List all roll numbers who have passed in first division.
5. List all students in BSc-II who have scored higher than average
i) in your college ii) in every college
6. List the highest score, average and minimum score in BSc-II
i) in your college ii) in every college

You might also like