0% found this document useful (0 votes)
74 views6 pages

Dbms Questions

The document describes creating various database tables to store student, course, book, item, and other data. It then provides tasks involving writing queries, procedures, forms and triggers against these tables to perform operations like validating data, setting statuses, generating reports, and more. The goals are to get experience with SQL, PL/SQL, forms and triggers by modeling typical school/library management systems and inventory applications through table structures and sample tasks.

Uploaded by

Anjaly Vipin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views6 pages

Dbms Questions

The document describes creating various database tables to store student, course, book, item, and other data. It then provides tasks involving writing queries, procedures, forms and triggers against these tables to perform operations like validating data, setting statuses, generating reports, and more. The goals are to get experience with SQL, PL/SQL, forms and triggers by modeling typical school/library management systems and inventory applications through table structures and sample tasks.

Uploaded by

Anjaly Vipin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

1.

Create the following table :

Student (roll-no, name, subject-name, subject-opted) Subject (faculty-code, faculty-name,


specialization, subject_taught)

(a) Generate queries to do the following :

(i) Find the number of students who have enrolled for the subject "DBMS".

(ii) Find all those faculty members who have not offered any subject.

(b) Using cursor list the name of students who opted a particular subject along with the teacher
who taught that particular subject.

2. Create the following table :

Item (item-code, item-name, qty-in-stock, reorder-level) Supplier (supplier-code, supplier-name,


address)

Can-supply(supplier-code, item-code)

(a) Generate queries to do the following :

(i) List all those suppliers who can supply the given item.

(ii) List all those items which cannot be supplied by given company.

(b) Using function list the items which is out of stock along with the supplier name and address.

3. Create the following tables :

Branch (branch-id, branch-name, customer-city, branch-id) Customer (customer-id, customer-name,


customer-city, branch-id)

(a) Generate queries to do the following :

(i) List all those customers who live in the same city as the branch in which they have account.

(ii) List all those customers who have an account in a given branch city.

4. Create the following tables :

Book(accession-no, title, publisher, year, date-of-purchase, status) Book-Place(accession-no, rack-id,


rack-position)

Member(member-id, name, number-of-books-issued, max-limit, status) Book-issue(accession-no,


member-id, date-of-issue)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Write a PL/SQL procedure to issue the book.


Write a trigger to set the status of a book neither to "lost" which is neither issued nor in the library.

5. Create the following tables :

Book(accession-no, title, publisher, year, date-of-purchase, status) Member(member-id, name,


number-of-books-issued, max-limit, status) Book-issue(accession-no, member-id, date-of-issue, due-
date)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Write a PL/SQL to list all those students who are defaulters. A student is considerer to be a
defaulter if he has not returned a book even after due-date. Write a trigger to set the status of
students to "back listed" if they have taken book but not returned even after one year.

6. Create the following tables :

Branch (branch-id, branch-name, branch-city)

Customer (customer-id, customer-name, customer-city, branch-id)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Generate queries to do the following :

(i) List all those customers who live in the same city as the branch in which they have account.

(ii) List all those customers who have an account in more than one branch.

7. Create the following tables :

Branch (branch-id, branch-name, customer-city)

Customer (customer-id, customer-name, customer-city, branch-id)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Generate queries to do the following :

(i) List all those customers who have more than 100 customer.

(ii) List all those customers who have an account in more than one branch.

8. Create the following table :

Student (roll-no, name, category, district, state) Student –rank (roll-no, marks, rank)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Generate queries to do the following :


(i) List names of the students who are having same rank but they should reside in different
districts.

(ii) List details of students they belongs to same category with same rank.

9. Create the following tables :

Student(roll-no, name, date-of-birth, course-id) Course (Course-id, name, fee, duration)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Generate queries to do the following :

(i) List all those students who are between 18-19 years of age and have opted for MCA course.

(ii) List all those courses in which number of students are less than 10.

..4

..4..

10. Create the following tables :

Student(roll-no, name, date-of-birth, course-id) Course (Course-id, name, fee, duration, status)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Write PL/SQL procedure to do the following :

Set the status of course to "not offered" in which the number of candidates is less than 5.

11. Create the following tables :

Student(roll-no, name, date-of-birth, course-id) Course (Course-id, name, fee, duration, status)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Write PL/SQL procedure to do the following :

Set the status of course to "not offered" in which the number of candidates is less than 5.

12. Create the following tables :

Student(roll-no, name, date-of-birth, course-id) Course (Course-id, name, fee, duration, status)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Write PL/SQL procedure to do the following :


Set the status of course to "offered" in which the number of candidates is at least 10 otherwise set it
to "not offered".

13. Create the following table :

Item (item-code, item-name, qty-in-stock, reorder-level) Supplier (supplier-code, supplier-name,


address)

Can-supply(supplier-code, item-code)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Write PL/SQL procedure to do the following :

Generate a report to list the items whose qty-in-stock is less than or equal to their reorder-levels.

14. Create the following table :

Item (item-code, item-name, qty-in-stock, reorder-level) Supplier (supplier-code, supplier-name,


address, status) Can-supply(supplier-code, item-code)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Write PL/SQL procedure to do the following :

Set the status of the supplier to "important" if the supplier can supply more than five items.

15. Create the following tables :

Item (item-code, item-name, qty-in-stock, reorder-level) Supplier (supplier-code, supplier-name,


address, status) Can-supply(supplier-code, item-code)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Write PL/SQL procedure to do the following :

Generate a report of those items that are supplied by those suppliers whose status is "important".

16. Create the following tables :

Student (roll-no, name, category, district, state) Student –rank (roll-no, marks, rank)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Write PL/SQL procedure to the following :

Generate a report to list of those districts from which the first hundred rankers come from.
17. Create the following tables :

Student (roll-no, name, subject-opted)

Subject –rank (subject-code, subject-name, faculty-code, specialization) Faculty (faculty-code, faculty-


name, specialization)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Write PL/SQL procedure to the following :

Set the status of the subject to "not offered" if the subject is not opted by at least 5 students.

18. Create the following tables :

Student (roll-no, name, subject-opted)

Subject –rank (subject-code, subject-name, faculty-code, specialization) Faculty (faculty-code, faculty-


name, specialization)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Write PL/SQL procedure to the following :

Set the status of the subject to "not offered" if the subject is not offered by any of the faculty
members.

19. Create the following tables :

Student (roll-no, name, subject-opted)

Subject –rank (subject-code, subject-name, faculty-code) Faculty (faculty-code, faculty-name,


specialization)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Generate queries to do the following :

(i) Find the number of students who have enrolled for the subject "DBMS"

(ii) Find all those subjects which are not offered by any faculty members.

20. Create the following tables :

Student (roll-no, name, subject-opted)

Subject –rank (subject-code, subject-name, faculty-code) Faculty (faculty-code, faculty-name,


specialization)
(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Generate queries to do the following :

(i) Find the number of students who have enrolled for the subject "DBMS"

(ii) Find all those subjects which are offered by more than one faculty member.

21. Create the following tables :

Student (roll-no, name, subject-opted)

Subject –rank (subject-code, subject-name, faculty-code) Faculty (faculty-code, faculty-name,


specialization)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Generate queries to do the following :

(i) Find the number of students who have enrolled for the subject "OS"

(ii) Find all those students who opted for more than 5 subjects.

22. Create the following tables :

Student (roll-no, name, subject-opted)

Subject –rank (subject-code, subject-name, faculty-code) Faculty (faculty-code, faculty-name,


specialization)

(a) Create a form to accept the data from the user with appropriate validation checks.

(b) Generate queries to do the following :

(i) Find the number of students who have not enrolled for the subject "DBMS"

(ii) Find all those subjects which are offered by more than one faculty member.

You might also like