Professional Documents
Culture Documents
Roll no.: 06
Acknowledgement
The term paper on ‘Book Store Management System’ prepared by me could not have been
completed without the moral support of our Teacher Mrs. Smita Saini. A Special Thanks to her
for guiding my efforts to perfection.
Finally, I would like to thank all my friends for their encouragement and good wishes.
-Hunney Salhotra
2
Table of Contents
Table of Contents....................................................................................................... 3
Aim............................................................................................................................. 4
Front End and Back End of the project.......................................................................4
SQL Server 2005..........................................................................................................................4
Visual Basic 2005........................................................................................................................4
Brief Explanation of Project........................................................................................5
Hardware and Software Requirements........................................................................................5
E-R Diagram................................................................................................................................5
Coding and Snapshots..................................................................................................................7
Coding At Back End..................................................................................................................26
Limitations................................................................................................................27
Future Use................................................................................................................27
Conclusion................................................................................................................ 27
Bibliography and References....................................................................................28
3
Aim
The project ‘Book Store Management System’ was undertaken for the partial fulfillment of
internals, as Term Paper for the subject Database Administration (CAP 414).
SQL Server 2005 (codenamed Yukon), released in October 2005, is the successor to SQL Server
2000. It included native support for managing XML data, in addition to relational data. For this
purpose, it defined an xml data type that could be used either as a data type in database columns
or as literals in queries. XML columns can be associated with XSD schemas; XML data being
stored is verified against the schema. XML is converted to an internal binary data type before
being stored in the database. Specialized indexing methods were made available for XML data.
XML data is queried using XQuery; SQL Server 2005 added some extensions to the T-SQL
language to allow embedding XQuery queries in T-SQL. In addition, it also defines a new
extension to XQuery, called XML DML that allows query-based modifications to XML data.
SQL Server 2005 also allows a database server to be exposed over web services using TDS
packets encapsulated within SOAP (protocol) requests. When the data is accessed over web
services, results are returned as XML.
For relational data, T-SQL has been augmented with error handling features and support for
recursive queries. SQL Server 2005 has also been enhanced with new indexing algorithms and
better error recovery systems. Data pages are check summed for better error resiliency, and
optimistic concurrency support has been added for better performance. Permissions and access
control have been made more granular and the query processor handles concurrent execution of
queries in a more efficient way. Partitions on tables and indexes are supported natively, so
scaling out a database onto a cluster is easier. SQL CLR was introduced with SQL Server 2005
to let it integrate with the .NET Framework.
Visual Basic 2005 helps you create solutions that run on the Microsoft Windows operating
system. If you are looking at this book, you might have already felt the need or the desire to
create such programs. Even if you have never written a computer program before, as you
progress through the Try It Out exercises in this book, you will become familiar with the various
aspects of the Visual Basic 2005 language, as well as its foundation in Microsoft’s .NET
Framework. You will find that it is not nearly as difficult as you have been imagining. Before
you know it, you will be feeling quite comfortable creating a variety of different types of
4
programs with Visual Basic 2005. Also (as the name .NET implies) Visual Basic 2005 can be
used to create applications for use over the Internet. You can also create mobile applications for
Pocket PCs and Smart-Phones.
Features:
Inventory Management
Billing Mechanism
Password Management
• 512 MB RAM
o Software Requirement
E-R Diagram
id bookname author
publication source
Inventory
5
Form1:
Public Class Form1
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Dim NewMDIChild As New addinven()
'Set the Parent Form of the Child window.
NewMDIChild.MdiParent = Me
'Display the new form.
NewMDIChild.Show()
End Sub
7
Dim NewMDIChild As New toorder()
'Set the Parent Form of the Child window.
NewMDIChild.MdiParent = Me
'Display the new form.
NewMDIChild.Show()
End Sub
8
NewMDIChild.MdiParent = Me
'Display the new form.
NewMDIChild.Show()
End Sub
9
addinven Form:
Imports System.Data
Imports System.Data.SqlClient
Public Class addinven
Inherits System.Windows.Forms.Form
Dim con As New SqlConnection("Data Source=HP\SQLEXPRESS;Initial
Catalog=master;Integrated Security=True")
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim dv As DataView
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button4.Click
unbind()
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
TextBox5.Clear()
TextBox6.Clear()
TextBox7.Clear()
TextBox8.Clear()
TextBox1.Focus()
Button2.Enabled = False
Button3.Enabled = False
End Sub
End Sub
10
TextBox4.DataBindings.Clear()
TextBox5.DataBindings.Clear()
TextBox6.DataBindings.Clear()
TextBox7.DataBindings.Clear()
TextBox8.DataBindings.Clear()
End Sub
End Sub
End Sub
11
com.CommandText = "UPDATE inventory SET id = @id, bookname=
@name, author= @auth,pub= @pub,quan= @quan,source = @source,price=
@pri,bill= @bill WHERE id= @ide"
com.Parameters.AddWithValue("@id", TextBox1.Text)
com.Parameters.AddWithValue("@name", TextBox2.Text)
com.Parameters.AddWithValue("@auth", TextBox3.Text)
com.Parameters.AddWithValue("@pub", TextBox4.Text)
com.Parameters.AddWithValue("@quan", TextBox5.Text)
com.Parameters.AddWithValue("@source", TextBox6.Text)
com.Parameters.AddWithValue("@pri", TextBox7.Text)
com.Parameters.AddWithValue("@bill", TextBox8.Text)
com.Parameters.AddWithValue("@ide", IdToolStripTextBox.Text)
con.Open()
com.ExecuteNonQuery()
MsgBox("Item Updated", MsgBoxStyle.Information, "Updated...")
Catch SqlExceptionerr As SqlException
MsgBox(SqlExceptionerr.Message)
Finally
con.Close()
End Try
End Sub
End Sub
End Class
12
13
invoice Form:
Imports System.Data
Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
End Sub
End Sub
14
com.Parameters.AddWithValue("@ba",
DataGridView1.Rows.Item(i).Cells(2).Value)
com.Parameters.AddWithValue("@bp",
DataGridView1.Rows.Item(i).Cells(3).Value)
com.Parameters.AddWithValue("@bq",
DataGridView1.Rows.Item(i).Cells(4).Value)
com.Parameters.AddWithValue("@bpri",
DataGridView1.Rows.Item(i).Cells(5).Value)
com.Parameters.AddWithValue("@btp",
DataGridView1.Rows.Item(i).Cells(6).Value)
com.Parameters.AddWithValue("@bttp", TextBox3.Text)
con.Open()
com.ExecuteNonQuery()
con.Close()
j = j + 1
Catch SqlExceptionerr As SqlException
MsgBox(SqlExceptionerr.Message)
Finally
con.Close()
End Try
Next
If Not j = 0 Then
MsgBox(j & " item(s) sold", MsgBoxStyle.Information, "Sold")
End If
For i = 0 To DataGridView1.RowCount - 1
Try
com.Parameters.Clear()
com.CommandText = "UPDATE inventory SET quan = quan-@quan
WHERE id = @bid"
com.Parameters.AddWithValue("@bid",
DataGridView1.Rows.Item(i).Cells(0).Value)
com.Parameters.AddWithValue("@quan",
DataGridView1.Rows.Item(i).Cells(4).Value)
con.Open()
com.ExecuteNonQuery()
Catch SqlExceptionerr As SqlException
MsgBox(SqlExceptionerr.Message)
Finally
con.Close()
End Try
Next
End Sub
15
End Sub
End Sub
End Class
16
pass Form:
Imports System.Data
Imports System.Data.SqlClient
Public Class pass
Inherits System.Windows.Forms.Form
Dim con As New SqlConnection("Data Source=HP\SQLEXPRESS;Initial
Catalog=master;Integrated Security=True")
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim dv As DataView
17
End If
End Sub
End Sub
18
End Try
Else
MsgBox("Passwords do not match")
End If
End Sub
End Class
19
access Form
End Sub
End Class
20
21
Search Form
End Sub
End Sub
End Sub
End Sub
22
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
End Try
End Sub
End Class
23
toorder Form:
End Sub
End Sub
End Class
24
viewinven Form:
End Sub
End Class
25
Coding At Back End
26
Limitations
Future Use
In future the software will be able to connect to internet and will gain client server architecture. It
will be very useful for the multi city book stores with centralized database. It will be helpful in
online selling and purchasing of book.
Conclusion
So, to conclude, the project is working fine in many areas and despite of some limitations, it is
fulfilling its aim and goal.
27
Bibliography and References
• google.com
28