You are on page 1of 3

ofCMSA Part III Assignment

Paper-VII B ( SQL & VB)

1. Design a Order Receiving System having the following database :

Customer(CId,CName,City,Phone)

Item(INo,IName,Price,Type)

Orders(Ono,Cid,INo,ODate,Qty)

Create the above tables in SQL with all integrity constraints. Insert at least six tuples in
each table so that the following queries yield some results :

a. Find the amount billed in order no O112.


b. List all orders placed in January 2015.
c. List all items which have never been ordered by any customer from Kolkata.
d. Find the average price of all items ordered by A.K.Basu correct upto nearest price.
e. Find all customers who have never ordered any Laptop.

Create an user Interface . Incorporate the following in your design.

a. Input,view,modify and delete data in each of the tables using separate forms.
b. Input ODate in orders table using calendar control.
c. Use option buttons to select names of cities of Customers.Include at least five cities
in your design.
d. Incorporate checks so that names of employees does not have any numeric values in
them,Show appropriate error messages.
e. Type should be selected from combo boxes, no other types can be typed.
f. Design another form to view the contents of the orders in text boxes connected
through text boxes.
g. Include an Exit button in Orders form. On clicking this button a message should be
displayed to re-confirm whether the user wants to exit or not. The application
should end when the user confirms so.

2. Design a Boat Reservation System having the following database :

Sailor ( Sid,SName,Age,Experience,marital-status)

Boat(Bid,BName,Colour)

Reserves(Sid,Bid,RDay)

Create the above tables in SQL with all integrity constraints. Insert at least six tuples in
each table so that the following queries yield some results :

a. List the name of the oldest sailor and the names of all boats reserved by him at least
once.
b. Display all sailors aged between 20 and 40 years according to years of experiences
in descending order.
c. List all sailors who have never reserved the green coloured boat named Dolphin.

1
d. List the details of unmarried sailors who have reserved red boats on Tuesday.
e. List the names f the boats reserved on Sunday by S.Maji.
f. Give the name of youngest sailor who reserved a blue boat on Monday.

Create an user Interface . Incorporate the following in your design.

a. Input, view, modify and delete data in each of the tables using separate forms.
b. Use combo boxes to chose whether a boat is reserved in a particular day or not. Use
horizontal scrollbar to accept age ( 20 50 ).
c. Use combo boxes to accept Sid and Bid so that they match with those in the
corresponding tables and foreign key constraints are retained.
d. Insert radio buttons for accepting the colour of the boats to be only red, black, blue.
e. Design another form to view the tuples in text boxes.
f. Include appropriate command buttons in each form so that the user can browse
from one form to the others by clicking those command buttons.

3. Design a Departmental Library System having the following database :

Book(BookId,Title,Author,Subject,Publisher,Price,Availability)

Borrower(Bid,BName,BAddress,BPhone,BCourse)

Borrows(BookId,Bid,IssueDate,ReturnDate,Fine)

Create the above tables in SQL with all integrity constraints. Insert at least six tuples in
each table so that the following queries yield some results :

a. Find the total number of books borrowed by Mr.A.Adams in 2014.


b. Find the books published by ACD Publications that have never been borrowed.
c. Find the details of all borrowers who have borrowed Basics of Mobile Computing at
least once.
d. Find all books that have been borrowed for the highest number of times.
e. Find all the borrowers who have borrowed the highest book at least once.
f. List all the books by J.David that has been borrowed by T.Dey in the month of
February 2014.
g. List the borrowers names who are already fined along with book names.

Create an user Interface . Incorporate the following in your design.

a. Input,view,modify and delete data in each of the tables using separate forms.
b. Input Borrows data in separate forms for Issue and Return. Use Combo boxes to
accept Bookid and Bid so that BookId and Bid matches those in the Book and
Borrower table.
c. Include subroutines to ensure that a borrower can borrow books when it is available
d. Also change the availability of Book when a book is borrowed or returned.
e. Calculate Fine given the following rule : A book must be returned within 14 days
from the date of issue. A fine of Rs 2 per day will be charged after the due date.
f. Show the time in Borrows Form.

2
4. Design a Student Attendance System having the following database :

Students(Roll,Sname,Course,Year)

Teacher(TId,TName,Code)

Attends(Roll,TId,Subject,ADate)

Create the above tables in SQL with all integrity constraints. Insert at least six tuples in
each table so that the following queries yield some results :

a. Find students whose names starts with A in B.Sc course who have attended at least
one class taken by Prof M.Banerjee.
b. Find teachers who have taught classes on Data Structure.
c. List the name of students who attended in classes taken by Mrs. S.Neogi in the
month of January 2015.
d. Count no of students who attended subject Mathematics in last week.

Create an user Interface . Incorporate the following in your design.

a. Input,view,modify and delete data in each of the tables using separate forms.
b. Design a separate form to change code. Make sure that only a valid user can change
code.
c. Input,view,modify and delete Attends data in a form.
d. In the Attends form, include three horizontal scrollbars, labeled as Red,Blue and
Green whose values ranges from 0-255. An user may choose from these scrollbars
to change the background colour of the form.
e. Input date in Attends form using calendar control.
f. Check if the maximum characters allowed for code is 8 or not.
g. In Attend form Date should be today and cant be less than today.

You might also like