You are on page 1of 61

DATE: EXP.

NO:1

PAYROLL

AIM:
To create database for the salary details, perform various operations like insert, delete,
update, search, and prepare necessary report.

TABLE DESCRIPTIONS:
 SQL> create table payroll(Empno number(10),empname char(15),dept_id
number(5),dob date, BP number(5),DA number(5),HRA number(5),PF
number(5),CCA number(5),MA number(5),LOAN number(5),Grosspay
number(5),Netpay number(5));
 SQL>desc payroll;

Name Null? Type


------------------------------- -------- ----
EMPNO NUMBER (5)
EMPNAME CHAR (15)
DEPTID NUMBER (5)
DOB DATE
BP NUMBER (5)
DA NUMBER (5)
HRA NUMBER (5)
PF NUMBER (5)
CCA NUMBER (5)
MA NUMBER (5)
LOAN NUMBER (5)
GROSSPAY NUMBER (5)
NETPAY NUMBER (5)
ER DIAGRAM:

Dept id
Empnam Empno
e

BP Employee Payroll
DOB

Loan CCA

MA Gross
Net
pay
pay

PF
DA
HRA

CODING:

ADD NEW:
Private Sub fa_Click()

Text1.SetFocus

Adodc1.Recordset.AddNew

End Sub

DELETE:
Private Sub fd_Click()

Adodc1.Recordset.Delete

MsgBox "Data deleted"

End Sub

SAVE:
Private Sub fs_Click()

Adodc1.Recordset.Save

MsgBox "Data Saved"

End Sub

SEARCH:
Private Sub fse_Click()

Dim c, MC As Integer

n = InputBox("Enter the emp number")

MC = Adodc1.Recordset.RecordCount

c=1

Adodc1.Recordset.MoveFirst

While Not (Adodc1.Recordset.Fields(0) = Val(n))

c=c+1

If c <= MC Then

Adodc1.Recordset.MoveNext

Else

MsgBox ("Record not found")


GoTo n:

End If

Wend

MsgBox ("Record found")

n:

End Sub

UPDATE:
Private Sub fu_Click()

Adodc1.Recordset.Update

MsgBox "Update and Save"

End Sub

REPORT:
Private Sub rep_Click()

DataReport1.Show

End Sub

CALCULATIONS:
Private Sub Text11_LostFocus()

Text12.Text = (Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text) + Val(Text9.Text) +


Val(Text10.Text))

Text13.Text = (Val(Text12.Text) - Val(Text8.Text) - Val(Text11.Text))

End Sub
Private Sub Text5_LostFocus()

Text6.Text = Val(Text5.Text) * 5 / 100

Text7.Text = Val(Text5.Text) * 5 / 100

Text8.Text = Val(Text5.Text) * 5 / 100

Text9.Text = Val(Text5.Text) * 5 / 100

Text10.Text = Val(Text5.Text) * 5 / 100

End Sub

FORM LAYOUT:
DATA REPORT

Result:
Thus the database has been created for payroll and report like all the records, names
are in ascending order has been prepared

DATE: EXP.NO:2
MARKSHEET PROCESSING

AIM:
To create a database and perform the operations like insert, delete, modify, and
generate the report for mark sheet processing by menu editor.

TABLE DESCRIPTIONS:
 SQL> create table Studentmark(name char(20),reg_no number(10),OS number(10),
CAO number(10), VB number(10), DBMS number(10),Total number(10),average
number(10), Grade char (10));

 SQL> DESC Studentmark;

Name Null? Type

------------------------ ------- ----

STUDENTNAME CHAR (15)


REGNO NUMBER (8)
OS NUMBER (5)
VB NUMBER (5)
CAO NUMBER (5)
DBMS NUMBER (5)
TOTAL NUMBER (10)
AVERAGE NUMBER (10)
GRADE CHAR (20)
ER DIAGRAM:

Nam Reg.n
OS
e o

MARKSHEET
Grad CA
e PROCESSING O

Averag DBMS
e
Total VB

CODING:
ADD NEW:

Private Sub fa_Click()

Text1.SetFocus

Adodc1.Recordset.AddNew

End Sub

DELETE:

Private Sub fd_Click()

Adodc1.Recordset.Delete

MsgBox "Data deleted"

End Sub
SAVE:

Private Sub fs_Click()

Adodc1.Recordset.Save

MsgBox "Data Saved"

End Sub

SEARCH:

Private Sub fse_Click()

Dim c, MC As Integer

n = InputBox("Enter the register number")

MC = Adodc1.Recordset.RecordCount

c=1

Adodc1.Recordset.MoveFirst

While Not (Adodc1.Recordset.Fields(1) = Val(n))

c=c+1

If c <= MC Then

Adodc1.Recordset.MoveNext

Else

MsgBox ("Record not found")

GoTo n:

End If

Wend

MsgBox ("Record found")


n:

End Sub

UPDATE:

Private Sub fu_Click()

Adodc1.Recordset.Update

MsgBox "Data Updated"

End Sub

DATA REPORT:

Private Sub rep_Click()

DataReport1.Show

End Sub

CALCULATION:

Private Sub Text6_LostFocus()

Text7.Text = (Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text))

Text8.Text = (Val(Text7.Text) / 4)

'Grade Textbox9

If Val(Text8.Text) > 90 Then

Text9.Text = "A"

ElseIf (Val(Text8.Text) > 80 And Val(Text8.Text) < 90) Then

Text9.Text = "B"

ElseIf (Val(Text8.Text) > 70 And Val(Text8.Text) < 80) Then


Text9.Text = "C"

ElseIf (Val(Text8.Text) > 60 And Val(Text8.Text) < 70) Then

Text9.Text = "D"

ElseIf (Val(Text8.Text) > 50 And Val(Text8.Text) < 60) Then

Text9.Text = "E"

ElseIf (Val(Text8.Text) < 50) Then

Text9.Text = "U"

End If

End Sub

FORM LAYOUT:
DATA REPORT:

Result:
Thus the mark sheet processing database is created and various operations are performed
and report is generated successfully.
DATE: EXP.NO:3

SAVING BANK ACCOUNT FOR BANKING

AIM:
To write a menu driverprogram for saving bank account for banking with fields Account
number, Name, Phone number, Transaction date, Balance, Deposit, and Withdraw.

TABLE DESCRIPTION:
 SQL>create table bank(Acc_no number(10), Name char(20), Ph_no
number(10),Open_bal number(10), Trans_date date, CLBalance number(10),
Transtype char(10),amount number(10);

 SQL>desc bank;

Name Null? Type

------------------------------- -------- ----

ACC_NO NUMBER (8)

NAME VARCHAR2 (8)

PH_NO NUMBER (10)

OPEN_BALANCE NUMBER (10)

TRANS_DATE DATE

CLBALANCE NUMBER (10)

TRANSTYPE VARCHAR(10)
AMOUNT NUMBER (10)

ER DIAGRAM:

Nam
Ph_n Acc_n
e
o o

BANKING
Open_ba Transtyp
l e

Trans_date Amount
CLBal

CODING:
ADD:

Private Sub fa_Click()

Text1.SetFocus

Adodc1.Recordset.AddNew

End Sub

DELETE:

Private Sub fd_Click()

Adodc1.Recordset.Delete

MsgBox "Record Deleted"


End Sub

DATA REPORT:

Private Sub fr_Click()

DataReport1.Show

End Sub

SAVE:

Private Sub fs_Click()

Adodc1.Recordset.Save

MsgBox "Record saved"

End Sub

UPDATE:

Private Sub fu_Click()

Adodc1.Recordset.Update

MsgBox "Record Updated"

End Sub

OPTIONS:

Private Sub Option1_Click()

Text7.Text = "Deposit"

End Sub
Private Sub Option2_Click()

Text7.Text = "Withdraw"

End Sub

SEARCH:

Private Sub se_Click()

Dim c, MC As Integer

n = InputBox("Enter the Account number")

MC = Adodc1.Recordset.RecordCount

c=1

Adodc1.Recordset.MoveFirst

While Not (Adodc1.Recordset.Fields(0) = Val(n))

c=c+1

If c <= MC Then

Adodc1.Recordset.MoveNext

Else

MsgBox ("Record not found")

GoTo n:

End If

Wend

MsgBox ("Record found")

n:

End Sub
CALCULATION:

Private Sub Command1_Click()

If Text7.Text = "Deposit" Then

Text6.Text = Val(Text8.Text) + Val(Text4.Text)

ElseIf Val(Text4.Text) >= Val(Text8.Text) Then

Text6.Text = Text4.Text - Text8.Text

Else

MsgBox "Insufficient Balance"

End If

End Sub

FORM LAYOUT:
DATA REPORT:

Result:
Thus the banking database has been created and the necessary reports are generated
successfully.

DATE: EXP.NO:4

INVENTORY SYSTEM

AIM:
To create the Inventory control system application using VB as front end and Oracle as
back end.

TABLE DESCRIPTION:
 SQL>Create table inventory (prodno number(10), proddes char(15), qoh number
(10), invlevel number(10), unitprice number(10));

 SQL> DESC inventory;

Name Null? Type

------------------------------- -------- ----

PROD_NO NUMBER (10)

PROD_DES CHAR (15)

QUANTITYONHAND NUMBER (10)

INVENTORYLEVEL NUMBER (10)

UNITPRICE NUMBER (10)


ER DIAGRAM:

prod_des
Qoh

INVENTORY
unitprice SYSTEM

Invlevel
prodcode

CODING:

ADD:

Private Sub add_Click()

Adodc1.Recordset.AddNew

End Sub

DELETE:

Private Sub del_Click()

Adodc1.Recordset.Delete
End Sub

DATA REPORT:

Private Sub rep_Click()

DataReport1.Show

End Sub

SAVE:

Private Sub sv_Click()

Adodc1.Recordset.Save

End Sub

UPDATE:

Private Sub up_Click()

Adodc1.Recordset.Update

End Sub

SEARCH:

Private Sub se_Click()

Dim c, MC As Integer

n = InputBox("Enter the Product number")

MC = Adodc1.Recordset.RecordCount
c=1

Adodc1.Recordset.MoveFirst

While Not (Adodc1.Recordset.Fields(0) = Val(n))

c=c+1

If c <= MC Then

Adodc1.Recordset.MoveNext

Else

MsgBox ("Record not found")

GoTo n:

End If

Wend

MsgBox ("Record found")

n:

End sub
FORM LAYOUT:

DATAREPORT:
Result:
Thus the inventory database has been created and reports are generated
successfully.
DATE: EXP.NO:5

INVOICE SYSTEM

AIM:
To create database and perform various operations and generate a report for invoice
system using menu editor.

TABLE DESCRIPTION:

 SQL> create table invoice(cusid number(10),itemcode number(10), itemdesc


char(10), unitprice number(10), quantity number(10), orderid number(10),
dateoforder date, amount number(10);
 SQL> DESC invoice;

Name Null? Type

------------------------------- -------- ----

CUS_ID NUMBER (10)

ITEM_CODE NUMBER (10)

ITEM_DESC CHAR (10)

UNIT_PRICE NUMBER (20)

QUANTITY NUMBER (10)

ORDER_ID NUMBER (10)

DATEOFORDER DATE

AMOUNT NUMBER (10)


ER DIAGRAM:

Item
code
Cus id
Item
desc

INVOICE SYSTEM
Unit
Amoun
Price
t

Dateoforder Quantit
y
Order
id

CODING:

ADD:

Private Sub fa_Click()

Adodc1.Recordset.AddNew

Text1.SetFocus

End Sub

DELETE:

Private Sub fd_Click()

Adodc1.Recordset.Delete
MsgBox "Record Deleted"

End Sub

SAVE:

Private Sub fs_Click()

Adodc1.Recordset.Save

MsgBox "Record Saved"

End Sub

UPDATE:

Private Sub fu_Click()

Adodc1.Recordset.Update

MsgBox "Record Updated"

End Sub

SEARCH:

Private Sub se_Click()

Dim c, MC As Integer

n = InputBox("Enter the CustomerID number:")

MC = Adodc1.Recordset.RecordCount

c=1

Adodc1.Recordset.MoveFirst
While Not (Adodc1.Recordset.Fields(0) = Val(n))

c=c+1

If c <= MC Then

Adodc1.Recordset.MoveNext

Else

MsgBox ("Record not found")

GoTo n:

End If

Wend

MsgBox ("Record found")

n:

End Sub

CALCULATION:

Private Sub Command1_Click()

Text8.Text = Val(Text4.Text) * Val(Text5.Text)

End Sub

DATA REPORT:

Private Sub rep_Click()

DataReport1.Show

End Sub
FORM LAYOUT:
DATA REPORT:

Result:
Thus the invoice database is created and various operations are performed and report is
generated successfully.
DATE: EXP.NO:6

LIBRARY INFORMATION SYSTEM


AIM:
To create a library information system application using VB as front end and Oracle as
backend.

TABLE DESCRIPTION:
SQL>create table library(stuname char(20),stuid number(10), bookname char(20),
bookid number(10), author char(20),copiestaken number(10),maxcopies number(10),
remainingcopies number(10),issuedatedate,returndate date, fineamount number(10));

SQL>desc library;

Name Null? Type

------------------------------- -------- ----

STUNAME CHAR (20)

STUID NUMBER (10)

DEPT CHAR (20)

BOOKNAME CHAR (20)

BOOKID NUMBER (10)

AUTHORNAME CHAR (20)

COPIESTAKEN NUMBER (10)

MAXCOPIES NUMBER (10)

REMAININGCOPIES NUMBER (10)

ISSUEDATE DATE

RETURNDATE DATE

FINEAMOUNT NUMBER (10)


ER DIAGRAM:

Fine amount
Return Student name
Date

Issue Stu id
Date

Remaining LIBRARY
Copies Dept
INFORMATION

Max Copies
Book
name
Copies taken Book
Autho id
r

CODING:

ADD:

Private Sub ad_Click()

Adodc1.Recordset.AddNew

Text1.SetFocus

End Sub

DELETE:

Private Sub de_Click()

Adodc1.Recordset.Delete
MsgBox "Record Deleted"

End Sub

CALCULATION:

Private Sub Command1_Click()

Dim issuedate As Date

Dim retdate As Date

issuedate = Text10.Text

retdate = Text11.Text

nodays = retdate - issuedate

If nodays > 7 Then

Text12.Text = (nodays - 7) * 5

Else

Text12.Text = "No fine"

End If

End Sub

DATA REPORT:

Private Sub frep_Click()

DataReport1.Show

End Sub

SAVE:
Private Sub sa_Click()

Adodc1.Recordset.Save

MsgBox "Record Saved"

End Sub

UPDATE:

Private Sub up_Click()

Adodc1.Recordset.Update

MsgBox "Save after editing.."

End Sub

FORM LAYOUT:
DATA REPORT:

RESULT:
Thus, the database has been created for library information system and various reports are
generated.

DATE: EXP.NO:7
STUDENT INFORMATION SYSTEM

AIM:
To create a student personal details application using VB as front end and Oracle as
backend.

TABLE DESCRIPTION:
 SQL> create table student_detail (Stu_name char(20), regno number(10),
fathername char(10), DOB date ,sex char(10),blood_group char(10),ph_no number
(10), address char(50), email char(20), dept char(10),ugmark number(10));
 SQL>DescStudent_detail;

Name Null? Type

------------------------------- -------- ----

STUREGNO VARCHAR2(10)

STUNAME CHAR(20)

ADDRESS VARCHAR2(20)

CITY CHAR(15)

PHONE NUMBER(11)

DOB DATE

FATHERSNAME CHAR(20)

DEPT CHAR(4)

COURSE CHAR(4)

YEAR NUMBER(1)

PERCENTAGE NUMBER(3)
ER DIAGRAM:

Fathers
Name DO
name B CIT
Reg
no Y

Nam COURS
e E

STUDENT INFORMATION
PERCENTAG
SYSTEM Ph no
E

Dep
t
Addres
s

YEAR
CODING:

ADD:

Private Sub fadd_Click()

Text1.SetFocus

Adodc1.Recordset.AddNew

End Sub

DELETE:
Private Sub fdel_Click()

Adodc1.Recordset.Delete

MsgBox "Record Deleted"

End Sub

SAVE:

Private Sub fsave_Click()

Adodc1.Recordset.Save

MsgBox "Record saved"

End Sub

UPDATE:

Private Sub fup_Click()

Adodc1.Recordset.Update

MsgBox "Save after making changes"

End Sub

DATA REPORT:

Private Sub rep_Click()

DataReport1.Show

End Sub

SEARCH:
Private Sub se_Click()

Dim c, MC As Integer

n = InputBox("Enter the Register number")

MC = Adodc1.Recordset.RecordCount

c=1

Adodc1.Recordset.MoveFirst

While Not (Adodc1.Recordset.Fields(0) = Val(n))

c=c+1

If c <= MC Then

Adodc1.Recordset.MoveNext

Else

MsgBox ("Record not found")

GoTo n:

End If

Wend

MsgBox ("Record found")

n:

End Sub

FORM LAYOUT:
DATA REPORT:
Result:
Thus the student’s database has been created and the necessary reports are generated
successfully.

DATE: EXP.NO:8
INCOME TAX PROCESSING SYSTEM

AIM:
To create a database for income tax calculation to perform the various operations like
addition, deletion, updation, and search using menus driven and to generate various
related reports.

Table description:
 SQL > Create table income(name char(10),panid number(10),sex char(5), salary
number(15),incometax(15));
 Desc income;

Name Null? Type

------------------------------- -------- ----

NAME CHAR (20)

PAN_ID NUMBER (20)

SEX CHAR (10)

SALARY NUMBER (15)

INCOMETAX NUMBER (15)


ER DIAGRAM:
Panid

Name Salary

INCOME TAX

Income Sex
tax

CODING:

ADD:

Private Sub ad_Click()

Adodc1.Recordset.AddNew

Text1.SetFocus

End Sub

DELETE:

Private Sub de_Click()

Adodc1.Recordset.Delete

MsgBox "Record deleted"

End Sub

OPTIONS:
Private Sub Option1_Click()

Text3.Text = "Male"

End Sub

Private Sub Option2_Click()

Text3.Text = "Female"

End Sub

DATA REPORT:

Private Sub re_Click()

DataReport1.Show

End Sub

SAVE:

Private Sub sa_Click()

Adodc1.Recordset.Save

MsgBox "Record saved"

End Sub

CALCULATION:

Private Sub Text4_LostFocus()

ansal = Val(Text4.Text) * 12

If ansal < 180000 Then


Text5.Text = "NIL"

ElseIf ansal >= 180000 And ansal < 500000 Then

Text5.Text = Abs((10 / 100) * (ansal - 180000))

ElseIf ansal >= 500000 And ansal < 800000 Then

Text5.Text = 32000 + Abs((20 / 100) * (ansal - 500000))

ElseIf ansal >= 800000 Then

Text5.Text = 92000 + Abs((30 / 100) * (ansal - 800000))

End If

End Sub

UPDATE:

Private Sub up_Click()

Adodc1.Recordset.Update

MsgBox "Make changes then save"

End Sub

SEARCH:

Private Sub se_Click()

Dim c, MC As Integer

n = InputBox("Enter the PAN ID number")

MC = Adodc1.Recordset.RecordCount

c=1
Adodc1.Recordset.MoveFirst

While Not (Adodc1.Recordset.Fields(1) = Val(n))

c=c+1

If c <= MC Then

Adodc1.Recordset.MoveNext

Else

MsgBox ("Record not found")

GoTo n:

End If

Wend

MsgBox ("Record found")

n:

End Sub

FORM LAYOUT:
DATA REPORT:
Result:
Thus the income tax database has been created and necessary reports are generated
successfully.

DATE: EXP.NO:9
ELECTRICITY BILLLING PREPARATION
SYSTEM

AIM:
To create database for the electricity bill details, perform various operations like insert,
delete, update, and search and prepare necessary reports.

TABLE DESCRIPTION:
 SQL>create table electricity (cusid number(10), cusname char(10), address
char(20),units number(10), amount number(10));

 SQL>desc electricity;

Name Null? Type

------------------------------- -------- ----

CUSTOMER NO NUMBER(10)

CUSTOMERNAME VARCHAR2(10)

ADDRESS VARCHAR2 (20)

UNITCONSUMED NUMBER (20)

BILLAMOUNT NUMBER (20)


ER DIAGRAM:
Cus id
Cus name
Units

ELECTRICITY BILL

Amount Address

CODING:

ADD:

Private Sub fa_Click()

Adodc1.Recordset.AddNew

Text1.SetFocus

End Sub

DELETE:

Private Sub fd_Click()

Adodc1.Recordset.Delete

MsgBox "Record Delete"

End Sub
SAVE:

Private Sub fs_Click()

Adodc1.Recordset.Save

MsgBox "Record Saved"

End Sub

UPDATE:

Private Sub fu_Click()

Adodc1.Recordset.Update

MsgBox "Update and save"

End Sub

DATA REPORT:

Private Sub rep_Click()

DataReport1.Show

End Sub

SEARCH:

Private Sub se_Click()

Dim c, MC As Integer

n = InputBox("Enter the Customer number")

MC = Adodc1.Recordset.RecordCount

c=1

Adodc1.Recordset.MoveFirst

While Not (Adodc1.Recordset.Fields(0) = Val(n))

c=c+1

If c <= MC Then
Adodc1.Recordset.MoveNext

Else

MsgBox ("Record not found")

GoTo n:

End If

Wend

MsgBox ("Record found")

n:

End Sub

CALCULATION:

Private Sub Text4_LostFocus()

Dim units As Long

units = Val(Text4.Text)

If units > 0 And units <= 100 Then

Text5.Text = (units * 1) + 20

ElseIf units > 100 And units <= 200 Then

Text5.Text = (units * 2) + 20

ElseIf units > 200 And units <= 500 Then

Text5.Text = (units * 3) + 30

ElseIf units > 500 Then

Text5.Text = (units * 4.5) + 40

End If

End Sub

FORM LAYOUT:
DATA REPORT:
Result:
Thus the database has been created for electricity bill and report like all records , units
above 400 and amount in ascending order has been prepared.

DATE: EXP.NO:10
TELEPHONE DIRECTORY

AIM:
To create database for the telephone directory details, perform various operations like insert,
delete , update, and prepare necessary reports.

TABLE DESCRIPTION:
 SQL> create table telephone(Cus_name number(10), address char(10), ph_no
number(10), mail _id char(10));
 Desc telephone;

Name Null? Type

------------------------------- -------- ----

PHONENO NUMBER(20)

CUSTNAME CHAR(10)

CUSTID NUMBER(10)

CUSTADDRESS NUMBER(14)

NOOF_UNITS NUMBER(15)

TOT_AMT NUMBER(15)

SERVICETAX NUMBER(15)

PAYABLE_AMT NUMBER(15)

ER DIAGRAM:
Phone Addres
no s
Cus Payable Amt
Name
TELEPHONE
CUS ID DIRECTORY
Total Amt

No Of Service Tax
Units

CODING:

ADD:

Private Sub fa_Click()

Adodc1.Recordset.AddNew

Text1.SetFocus

End Sub

DELETE:

Private Sub fd_Click()

Adodc1.Recordset.Delete

Text1.SetFocus

MsgBox "Record deleted"


End Sub

SAVE:

Private Sub fs_Click()

Adodc1.Recordset.Save

MsgBox "Record saved"

End Sub

UPDATE:

Private Sub fu_Click()

Adodc1.Recordset.Update

MsgBox "Update n Save"

End Sub

DATA REPORT:

Private Sub rep_Click()

DataReport1.Show

End Sub

SEARCH:

Private Sub se_Click()

Dim c, MC As Integer

n = InputBox("Enter the Customer number")

MC = Adodc1.Recordset.RecordCount
c=1

Adodc1.Recordset.MoveFirst

While Not (Adodc1.Recordset.Fields(0) = Val(n))

c=c+1

If c <= MC Then

Adodc1.Recordset.MoveNext

Else

MsgBox ("Record not found")

GoTo n:

End If

Wend

MsgBox ("Record found")

n:

End Sub

CALCULATION:

Private Sub Text5_LostFocus()

Text6.Text = Abs(Val(Text5.Text) * 0.5)

Text7.Text = Abs(Val(Text6.Text) * 12.36 / 100)

Text8.Text = Val(Text6.Text) + Val(Text7.Text)

End Sub
FORM LAYOUT:

DATA REPORT:
Result:
Thus the database has been created for telephone directory and report like all the records,
amount above and unit greater than 400 has been prepared.

You might also like