DBMS Mini Project
Short Description
its mini project with front end visual basic and back end sql...
Description
EX: NO: 13
REPORT GENERATION
AIM To design a report for employee database using Visual Basic. PROCEDURE STEP 1: Start STEP 2: Create the form with essential controls for employee details. STEP 3: Insert the data environment for report generation STEP 4: Connect the database STEP 5: Write the code for doing the appropriate operations in the employee database. STEP 6: Save the forms and project. STEP 7: Execute the form. STEP 8: Stop EXECUTION MAIN FORM CODE: Private Sub Command1_Click() Unload Me Form1.Visible = False Form2.Visible = True Load Form2 Form2.Show End Sub Private Sub Command2_Click() Unload Me Form1.Visible = False Form3.Visible = True Load Form4 Form3.Show End Sub
1
Private Sub Command3_Click() Unload Me Form1.Visible = False Form4.Visible = True Load Form3 Form4.Show End Sub Private Sub Command4_Click() End End Sub Private Sub Command5_Click() DataReport1.Show End Sub FORM2 CREATION CODE: General Declaration Dim con As New ADODB.Connection Dim gp, ded, net As Double Private Sub Command1_Click() gp = Val(Combo1.ItemData(Combo1.ListIndex)) + Val(Text7.Text) ded = Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) net = gp - ded con.Execute "insert into emp values('" & Text1.Text & "','" & Text2.Text & "','" & Combo1.Text & "','" & Text3.Text & "','" & Val(Combo1.ItemData(Combo1.ListIndex)) & "','" & Val(Text4.Text) & "','" & Val(Text5.Text) & "','" & Val(Text6.Text) & "','" & Val(Text7.Text) & "','" & gp & "','" & net & "',0)" MsgBox ("Records Created!!!!!!!!!!!") Unload Form2 Load Form1 Form1.Show End Sub Private Sub Form_Load() con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Program Files\Microsoft Visual Studio\VB98\subbu\employee.mdb;Persist Security Info=False" End Sub Private Sub Form_Unload(Cancel As Integer) con.Close End Sub
2
FORM3 UPDATION CODE: General Declaration Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Dim n As Double Private Sub Command1_Click() rs.Open "select * from emp where id='" & Text1.Text & "'", con n = rs.Fields(10) + Val(Text2.Text) con.Execute "update emp set others='" & Val(Text2.Text) & "',net_salary='" & n & "' where id='" & Text1.Text & "'" MsgBox ("Records Updated!!!!!!!!!!!!!") Unload Form3 Load Form1 Form1.Show End Sub Private Sub Form_Load() con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Program Files\Microsoft Visual Studio\VB98\subbu\employee.mdb;Persist Security Info=False" End Sub Private Sub Form_Unload(Cancel As Integer) con.Close End Sub FORM4 DISPLAY CODE: General Declaration Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Dim num As String Private Sub Command1_Click() num = Text1.Text rs.Open "select * from emp where id='" + num + "'", con Set DataReport1.DataSource = rs DataReport1.Show End Sub Private Sub Form_Load() con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Program Files\Microsoft Visual Studio\VB98\subbu\employee.mdb;Persist Security Info=False" End Sub
3
Private Sub Form_Unload(Cancel As Integer) con.Close End Sub DATABASE: EMPLOYEE DETAILS EMPLOY INFORMATION
EMPLOYEE CREATE FORM
4
DATABASE RECORDS:
5
UPDATE EMPLOYEE DETAILS:
UPDATED DATABASE:
DISPLAY:
6
DATA REPORT:
7
8
EX: NO:
PAYROLL PROCESSING SYSTEM
AIM To develop an application software for Payroll processing of an organization . DESIGN PLAN The Design plan consists of the following: Project Plan Software requirement Analysis Implementation and Coding Software testing Software Debugging Conclusion PROJECT PLAN The Project plan consists of three sections: Personal Details of an employee Allowances Deduction and Checking the increment and Net pay SOFTWARE REQUIREMENT ANALYSIS The purpose of the Payroll as to provide Payroll for the Employee with allowance and deduction individually and to update the Net pay. Functionality of System: 1. Personal Details of an Employee: It includes Employee Name ,Employee id,Address,Designation and Date of Birth.
9
EXECUTION FORM 1: Private Sub Command1_Click() Unload Me Form2.Show End Sub Private Sub Command2_Click() Unload Me Form3.Show End Sub Private Sub Command3_Click() Unload Me Form4.Show End Sub Private Sub Command4_Click() End End Sub Private Sub Command5_Click() Unload Me Form5.Show End Sub
10
FORM 2: Private Sub Command1_Click() Adodc1.Recordset.AddNew Adodc1.Recordset.Fields("e_name") = Text1.Text Adodc1.Recordset.Fields("e_no") = Val(Text2.Text) Adodc1.Recordset.Fields("des") = Text3.Text Adodc1.Recordset.Fields("age") = Val(Text4.Text) Adodc1.Recordset.Fields("sex") = Text5.Text Adodc1.Recordset.Fields("dob") = Val(Text6.Text) Adodc1.Recordset.Fields("doj") = Val(Text7.Text) Adodc1.Recordset.Fields("sal") = Val(Text8.Text) Adodc1.Recordset.Fields("ph") = Val(Text9.Text) Adodc1.Recordset.Fields("e_mail") = Text10.Text 'Adodc1.Recordset.Update End Sub Private Sub Command2_Click() Adodc1.Recordset.Fields("e_name") = Text1.Text Adodc1.Recordset.Update End Sub Private Sub Command3_Click() a = InputBox("Enter the Employee Number", Emp_no) Adodc1.Recordset.MoveFirst On Error GoTo diva While Not Adodc1.Recordset.Fields("e_no") = Val(a) Adodc1.Recordset.MoveNext Wend diva: End Sub Private Sub Command4_Click() b = MsgBox("Are you sure you want to delete it....", vbOKCancel + vbExclamation) If b = 1 Then Adodc1.Recordset.Delete Adodc1.Recordset.MoveNext MsgBox "Record is Deleted" Else End If End Sub Private Sub Command5_Click() Unload Me Load Form1: Form1.Visible = True End Sub
11
FORM 3: Dim c As Variant Private Sub Command1_Click() Adodc1.Recordset.AddNew Adodc1.Recordset.Fields("e_name") = Text1.Text Adodc1.Recordset.Fields("e_no") = Val(Text2.Text) Adodc1.Recordset.Fields("sal") = Val(Text3.Text) Adodc1.Recordset.Fields("loan") = Val(Text4.Text) Adodc1.Recordset.Fields("loan_left") = Val(Text5.Text) Adodc1.Recordset.Fields("ma") = Val(Text6.Text) Adodc1.Recordset.Fields("hra") = Val(Text7.Text) Adodc1.Recordset.Fields("ins_left") = Val(Text8.Text) Adodc1.Recordset.Fields("da") = Val(Text9.Text) Adodc1.Recordset.Fields("total_allow") = Val(Text10.Text) 'adodc1.Recordset.Update End Sub Private Sub Command2_Click() Adodc1.Recordset.Fields("e_name") = Text1.Text Adodc1.Recordset.Update End Sub Private Sub Command3_Click() a = InputBox("Enter the Employee Number", "Diva") Adodc1.Recordset.MoveFirst On Error GoTo diva While Not Adodc1.Recordset.Fields("e_no") = Val(a) Adodc1.Recordset.MoveNext Wend diva: End Sub Private Sub Command4_Click() b = MsgBox("Are you sure you want to delete it....", vbOKCancel + vbCritical, "Diva") If b = 1 Then Adodc1.Recordset.Delete Adodc1.Recordset.MoveNext MsgBox "Record is Deleted" Else End If End Sub Private Sub Command5_Click() Unload Me Load Form1: Form1.Visible = True End Sub
12
Private Sub Form_Load() c = (Val(Text6.Text) + Val(Text7.Text) + Val(Text9.Text)) Text10.Text = c Adodc1.Recordset.Fields("e_name") = Text1.Text Adodc1.Recordset.Update End Sub Private Sub Text3_Change() x = Val(Text3.Text) Text6.Text = (x / 2) Text7.Text = (x / 3) Text9.Text = (x / 4) c = (Val(Text6.Text) + Val(Text7.Text) + Val(Text9.Text)) Text10.Text = c Adodc1.Recordset.Fields("e_name") = Text1.Text Adodc1.Recordset.Update End Sub FORM 4: Dim c As Variant Private Sub Command1_Click() Adodc1.Recordset.AddNew Adodc1.Recordset.Fields("e_name") = Text1.Text Adodc1.Recordset.Fields("e_no") = Val(Text2.Text) Adodc1.Recordset.Fields("sal") = Val(Text3.Text) Adodc1.Recordset.Fields("spf") = Val(Text4.Text) Adodc1.Recordset.Fields("fa") = Val(Text5.Text) Adodc1.Recordset.Fields("hf") = Val(Text6.Text) Adodc1.Recordset.Fields("hr") = Val(Text7.Text) Adodc1.Recordset.Fields("income_tax") = Val(Text8.Text) Adodc1.Recordset.Fields("others") = Val(Text9.Text) Adodc1.Recordset.Fields("total_ded") = Val(Text10.Text) 'adodc1.Recordset.Update End Sub Private Sub Command2_Click() Adodc1.Recordset.Fields("e_name") = Text1.Text Adodc1.Recordset.Update End Sub Private Sub Command3_Click() a = InputBox("Enter the Employee Number", "Diva") Adodc1.Recordset.MoveFirst On Error GoTo diva While Not Adodc1.Recordset.Fields("e_no") = Val(a)
13
Adodc1.Recordset.MoveNext Wend diva: End Sub Private Sub Command4_Click() b = MsgBox("Are you sure you want to delete it....", vbOKCancel + vbCritical, "Diva") If b = 1 Then Adodc1.Recordset.Delete Adodc1.Recordset.MoveNext MsgBox "Deleted" Else End If End Sub Private Sub Command5_Click() Unload Me Load Form1: Form1.Visible = True End Sub Private Sub Form_Load() x = Val(Text3.Text) Text4.Text = (x / 0.2) Text5.Text = (x / 0.2) Text6.Text = (x / 0.2) Text7.Text = (x / 0.2) Text8.Text = (x / 0.2) Text9.Text = (x / 0.2) c = (Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text9.Text)) Text10.Text = c Adodc1.Recordset.Fields("e_name") = Text1.Text Adodc1.Recordset.Update End Sub Private Sub Text2_Change() c = (Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text9.Text)) Text10.Text = c End Sub Private Sub Text3_Change() x = Val(Text3.Text) Text4.Text = (x / 0.2) Text5.Text = (x / 0.2) Text6.Text = (x / 0.2) Text7.Text = (x / 0.2) Text8.Text = (x / 0.2)
14
Text9.Text = (x / 0.2) Adodc1.Recordset.Fields("e_name") = Text1.Text Adodc1.Recordset.Update End Sub FORM 5: Private Sub Command1_Click() Unload Me Load Form1: Form1.Visible = True End Sub Private Sub Command2_Click() End End Sub Private Sub Command3_Click() a = InputBox("Enter the Employee Number", "Diva") Adodc1.Recordset.MoveFirst On Error GoTo diva While Not Adodc1.Recordset.Fields("e_no") = Val(a) Adodc1.Recordset.MoveNext Wend diva: End Sub Private Sub Form_Load() Adodc1.Recordset.Fields("e_name") = Text1.Text Adodc1.Recordset.Update End Sub Private Sub Text1_Change() b = Val(Text3.Text) + Val(Text4.Text) c = b - Val(Text5.Text) Text6.Text = c End Sub
15
16
17
18
19
CONCLUSION The Payroll Software can be used in Corporate offices, Organizations and Institutes for calculating the net pay feasibly. The software is user-friendly and can be handled by anyone. 20
EX.NO: 17
LIBRARY MANAGEMENT SYSTEM
AIM To develop an application software for Library Management System. DESIGN PLAN The Design plan consists of the following: Project Plan Software requirement Analysis Implementation and Coding Software testing Software Debugging Conclusion PROJECT PLAN The Project plan consists of three sections: Student Information Book Information Borrowing and returning Process SOFTWARE REQUIREMENT ANALYSIS The purpose of the Library Management System is to manage Borrowing and receiving books from the student and updating book information for every transaction ( both Borrowing & receiving) . Functionality of System: 2. Student Information: It includes the student information for Borrowing and returning the books with
21
the updated books information. 3. Book Information: It includes Book Information such as Author name ,Code, account number , Publisher name,Date of Issue and Date of returning .. 4. Borrowing and ending Process It displays the information about the books issued ,burrower,returning date ,duration to have the books. SOFTWARE TESTING The main objectives of testing to maximize the test case , minimize the number of errors, focus on correctness and efficiency of program.It helps to find out details of the student who have borrowed the particular books.Both the Book information ,student information can be obtained. EXECUTION FORM 1: Private Sub Command1_Click() Me.Hide Load Form5 Form5.Visible = True End Sub Private Sub Command2_Click() Me.Hide Load Form3 Form3.Visible = True End Sub Private Sub Command3_Click() Me.Hide Load Form4 Form4.Visible = True End Sub Private Sub Command4_Click() End End Sub
22
FORM 2: Private Sub Command1_Click() Data1.Recordset.AddNew Data1.Recordset.Fields("roll_no") = Val(Text1.Text) Data1.Recordset.Fields("name") = Text2.Text Data1.Recordset.Fields("dep") = Text3.Text Data1.Recordset.Fields("year") = Val(Text4.Text) Data1.Recordset.Update End Sub Private Sub Command2_Click() b = MsgBox("Are you sure u want to delete it...", vbOKCancel + vbExclamation) If b = 1 Then Data1.Recordset.Delete Data1.Recordset.MoveNext MsgBox "Record is deleted" Else End If End Sub Private Sub Command3_Click() a = InputBox("Enter the student roll number", roll_no) Data1.Recordset.MoveFirst On Error GoTo jvm While Not Data1.Recordset.Fields("roll_no") = Val(a) Data1.Recordset.MoveNext Wend jvm: End Sub Private Sub Command5_Click() End End Sub Private Sub Command6_Click() Unload Me Load Form1: Form1.Visible = True End Sub FORM 3: Private Sub Command1_Click() Data1.Recordset.AddNew
23
Data1.Recordset.Fields("book_id") = Val(Text1.Text) Data1.Recordset.Fields("name") = Text2.Text Data1.Recordset.Fields("author") = Text3.Text Data1.Recordset.Fields("copies") = Val(Text4.Text) Data1.Recordset.Update End Sub Private Sub Command2_Click() b = MsgBox("Are you sure u want to delete it...", vbOKCancel + vbExclamation) If b = 1 Then Data1.Recordset.Delete Data1.Recordset.MoveNext MsgBox "Record is deleted" Else End If End Sub Private Sub Command3_Click() Dim a As String a = InputBox("Enter the book name", book_name) Data1.Recordset.MoveFirst On Error GoTo jvm Do Until Data1.Recordset.EOF If Data1.Recordset("book_name") = a Then Text1 = Data1.Recordset.Fields("book_id") MsgBox "The book id is " + Data1.Recordset.Fields("book_id") + " It has " + Data1.Recordset.Fields("copies") End If Data1.Recordset.MoveNext Loop jvm: End Sub Private Sub Command5_Click() End End Sub Private Sub Command6_Click() Unload Me Load Form1: Form1.Visible = True End Sub Private Sub Text6_Change() If Text6.Text = 0 Then
24
MsgBox "No copies Available" End If End Sub FORM 4: Dim x As Date Private Sub Command1_Click() Data1.Recordset.AddNew Data1.Recordset.Fields("roll_no") = Val(Text1.Text) Data1.Recordset.Fields("name") = Text2.Text Data1.Recordset.Fields("book_id") = Val(Text3.Text) Data1.Recordset.Fields("book_name") = Text4.Text Data1.Recordset.Fields("curr_date") = Val(Text5.Text) Data1.Recordset.Fields("date_of_return") = Val(Text6.Text) Data1.Recordset.Update End Sub Private Sub Command2_Click() b = MsgBox("Are you sure u want to delete it...", vbOKCancel + vbExclamation) If b = 1 Then Data1.Recordset.Delete Data1.Recordset.MoveNext MsgBox "Record is deleted" Else End If End Sub Private Sub Command3_Click() a = InputBox("Enter the student roll number", roll_no) Data1.Recordset.MoveFirst On Error GoTo jvm While Not Data1.Recordset.Fields("roll_no") = Val(a) Data1.Recordset.MoveNext Wend jvm: End Sub Private Sub Command4_Click() Text6.Text = DateValue(Text5) + 15 End Sub Private Sub Command5_Click() End End Sub Private Sub Command6_Click()
25
Unload Me Load Form1: Form1.Visible = True End Sub Private Sub Command7_Click() Dim n As Double n = (DateValue(Text7) - DateValue(Text5)) If n > 15 Then n = n - 15 n=n/2 Text8 = n End If End Sub Private Sub Text5_Click() If Val(Text4.Text) = 0 Then MsgBox "No copies Available" End If End Sub FORM 5: Private Sub Command1_Click() Form2.Show End Sub Private Sub Command2_Click() Form6.Show End Sub Private Sub Command3_Click() Form1.Show End Sub FORM 6: Private Sub Command1_Click() Form1.Show End Sub
26
27
28
29
30
Conclusion This Software provides an efficient way of managing the library and it makes easier for the user to work with application software. This project is user friendly and it reduces the time for the user to manage the library.
31
EX. NO:
AUTOMATING BANKING SYSTEM
AIM To develop an application software for Automating Banking System. DESIGN PLAN The Design plan consists of the following: Project Plan Software requirement Analysis Implementation and Coding Software testing Software Debugging Conclusion PROJECT PLAN The Project plan consists of three sections: Authentication Client details Savings and Withdrawal process SOFTWARE REQUIREMENT ANALYSIS The purpose of the Automating Banking System as to provide client services. Functionality of System : 5. Authentication: It includes validation of client user name and password. 6. Client Details:
32
It includes client details such as Customer name ,Code, account number , phone number and balance amount. 7. Savings and Withdrawal process It displays the current balance amount before and after depositing and withdrawing the amount. SOFTWARE TESTING The main objectives of testing to maximize the test case , minimize the number of errors, focus on correctness and efficiency of program.It helps to find out details of the customer and displays the current financial position of the customer. EXECUTION FORM 1: Public ind As Integer Public mo As Long Private Sub Command1_Click() Adodc1.Recordset.MoveFirst Do Until Adodc1.Recordset.EOF If (Adodc1.Recordset.Fields("name") = Text1.Text) And (Adodc1.Recordset.Fields("pass") = Text2.Text) Then Me.ind = Adodc1.Recordset.Fields("index") Unload Me Form2.Show End If Adodc1.Recordset.MoveNext Loop Text1.Text = "" Text2.Text = "" End Sub Private Sub Command2_Click() End End Sub Private Sub Form_Load() Text1.Text = "" Text2.Text = "" End Sub
33
FORM 2: Private Sub Command1_Click() Unload Me Form3.Show End Sub Private Sub Command2_Click() Unload Me Form4.Show End Sub Private Sub Command3_Click() Unload Me Form5.Show End Sub Private Sub Command4_Click() End End Sub Private Sub Command5_Click() End End Sub Private Sub Command6_Click() Adodc1.Recordset.AddNew End Sub Private Sub Command7_Click() Adodc1.Recordset.Delete End Sub Private Sub Command8_Click() Unload Me Form1.Show End Sub Private Sub Form_Load() mo = Form1.ind If mo = 0 Then Command1.Visible = False Command2.Visible = False Command3.Visible = False Command4.Visible = False Else
34
Command5.Visible = False Command6.Visible = False Command7.Visible = False DataGrid1.Visible = False End If End Sub FORM 3: Private Sub Command3_Click() Unload Me Form2.Show End Sub Private Sub Command1_Click() Unload Me Form2.Show End Sub Private Sub Command2_Click() End End Sub Private Sub Form_Load() mo = Form1.ind Adodc1.Recordset.Move (mo) End Sub
35
FORM 4: Private save As Integer Private temp As Long Private Sub Command1_Click() save = InputBox("Enter the amount to be saved to your a/c") Text4.Text = Val(save) temp = Adodc1.Recordset.Fields("total_amt") temp = Val(temp) + Val(save) Adodc1.Recordset.Fields("total_amt") = Val(temp) Adodc1.Recordset.Update Command2.Enabled = True End Sub Private Sub Command2_Click() c = MsgBox("Are you sure to cancel current saving transaction...", vbOKCancel + vbInformation) If c = 1 Then save = Val(Text4.Text) temp = Val(temp) - Val(save) Text4.Text = "" Adodc1.Recordset.Fields("total_amt") = Val(temp) Adodc1.Recordset.Update End If Command2.Enabled = False End Sub Private Sub Command3_Click() Unload Me Form2.Show End Sub Private Sub Form_Load() mo = Form1.ind Adodc1.Recordset.Move (mo) Command2.Enabled = False End Sub
36
FORM 5: Private withd As Integer Private temp As Long Private Sub Command3_Click() Unload Me Form2.Show End Sub Private Sub Form_Load() mo = Form1.ind Adodc1.Recordset.Move (mo) Command2.Enabled = False End Sub Private Sub Command1_Click() x = Adodc1.Recordset.Fields("total_amt") withd = InputBox("Enter the amount to be Withdrawal to your a/c") Text4.Text = Val(withd) If ((Text4.Text) > Val(x)) Then MsgBox "withdrawal cannot be possible" Exit Sub Else temp = Adodc1.Recordset.Fields("total_amt") temp = Val(temp) - Val(withd) Adodc1.Recordset.Fields("total_amt") = Val(temp) Adodc1.Recordset.Update Command2.Enabled = True End If End Sub Private Sub Command2_Click() c = MsgBox("Are you sure to cancel current Withdrawal transaction...", vbOKCancel + vbInformation) If c = 1 Then withd = Val(Text4.Text) temp = Val(temp) + Val(withd) Text4.Text = "" Adodc1.Recordset.Fields("total_amt") = Val(temp) Adodc1.Recordset.Update End If Command2.Enabled = False End Sub
37
38
39
40
41
Conclusion Thus the Software provides efficient way for Automating Banking process,It provides way for depositing and withdrawing the amount.
42
EX: NO:
STUDY EXPRIMENT TO DESIGN E-R MODEL
AIM To design an Entity-relationship model. PROCEDURE STEP 1: Start STEP 2: Specify attributes and identify the primary key for Entity. STEP 3: Formulate the relation between entities. STEP 4: Ensure that all the entities have been modeled. STEP 5: Normalize the entire model. STEP 6: Stop DESCRIPTION OF ENTITY-RELATIONSHIP SYMBOLS 1. Rectangle It represents Entity Sets 2. Ellipse It represents Attributes 3. Diamond It represents Relation Set 4. Lines It represents Link between attributes to entity set and entity set to relationship set. 5. Doubled Ellipse It represents derived attributes. 6. Dashed Ellipse It represents primary key 7. Double Lines It represents participation of an entity in a relationship set. 8. Weak Entity Set An entity which does not pass any attribute for primary key 9. Strong Entity Set An entity which passes a dominant parametric feature for unique identification.
43
E-R MODEL FOR BANKING ENTERPRISE
Result: Thus the E-R Model has been studied and acquired the knowledge.
44
45
View more...
Comments