Introduction
1.1 Introduction of the systemThe modern industrial world is
very much advanced in technology and competition in the world is
intense. The user of a computer is provided with the HARDWARE and
SOFTWARE, the two source of the computer. Much of the software will
be programs which facilities the fast automatic management of the
computer system resource.
The Mobile Store Management SystemThe Mobile Store Management
System is one can go into almost required solution regarding the
Mobile store. This software package provides guidance for all the
mobile shop purpose, as a perfect guide, the current demand for
such software became needful. This project will provide for
computerization of a small enterprise whose main goal is to keep
track on their inventory and billing process and wants to change
from paper based transaction to computerized transaction. The
mobile store management will make storing of the stock records,
employee records, purchase information, and customer information a
lot easier. The supplier and sales information in the database will
automatically generate bills when the customer buys the mobile. The
bill history can be retrieved promptly. And reports will be
generated based on different criterias.The product could be
implemented in an average sized organization, which will not be
very keen on spending loads of money on ledgers. Whereas our
product will greatly reduce the running by using common and cheap
office items like database and desktop application. And also there
is no requirement to store books or accounts. The data is directly
stored in the database in the hard disk of the PC.We are creating
the application for Techno pulse company. System Title: Mobile
store management. System category: RDBMS(Relational Database
Management System) A short definition of an RDBMS may be a DBMS in
which data is stored in the form of tables and the relationship
among the data is also stored in the form of tables. Operational
Status: Under Development status. Undergoing Major Modification:
Data will be stored in the database after the development..In this
project Java has been used as the Front-End tool and MS Access has
been used as the back-End tool.The following are the Scope and area
covered:
It can be applied to large databases with more information. To
enables the software to work in a multi-user environment. To enable
the software to develop the profit and loss accounts of the
firm.Structure of the system:
Menu Sale Purchase Daily ExpenseEmployee
InfoItemmasterReportsStockPurchaseEmployeeSales
Fig 1.11.2 Introduction of the software used for the
developmentNET BEANS PLATFORM: Just as application servers such as
GlassFish provide lifecycle services to web applications, the
NetBeans runtime container provides them to Swing applications.
Application servers understand how to compose web modules, EJB
modules, and so on, into a single web application, just as the
NetBeans runtime container understands how to compose NetBeans
modules into a single Swing application. APACHE TOMCAT is an open
source software implementation of the Java Servlet and JavaServer
Pages technologies. The Java Servlet and JavaServer Pages
specifications are developed under the Java Community Process.
Apache Tomcat is developed in an open and participatory environment
and released under the Apache License version 2. Apache Tomcat is
intended to be a collaboration of the best-of-breed developers from
around the world. We invite you to participate in this open
development project. Apache Tomcat powers numerous large-scale,
mission-critical web applications across a diverse range of
industries and organizations. Some of these users and their stories
are listed on the PoweredBy wiki page.
MS ACCESSis used to create simple database solutions. Access
tables support a variety of standard field types, indices, and
referential integrity. Access also includes a query interface,
forms to display and enter data, and reports for printing. The
underlying Jet database, which contains these objects, is
multiuser-aware and handles record-locking and referential
integrity including cascading updates and deletes. Data is locked
at the record level which is significantly different from Excel
which locks the entire spreadsheet.1.3 Introduction of the software
used for the ImplementationJAVA has evolved to be the most
predominant and popular general purpose programming language of the
current age. Java is a simple, portable, distributed, robust,
secure, dynamic, architecture neutral, object oriented programming
language.
Software Requirement Specification
2.1 Introduction:
The Software Requirement Specification is a document that
describes the external requirement for any system. The Requirement
analyst has to identify the Requirements by taking to the clients
and understanding their needs. The inputs are to be gathered from
different resources, these inputs may be inconsistent. The
Requirement phase translates the ideas in the minds of the clients
into a formal document. Here the user needs are accurately
specified. Requirement must be actionable, measurable and testable
related to business need or opportunities and defined to a level of
detail sufficient for system design.Advantages of developing the
SRS is as follows:- An SRS establishes the basis for the agreement
between the client and the developer on what the software product
will do. SRS provides a reference for validation of the final
product. A high-quality SRS is a prerequisite to high-quality
software. A high-quality SRS reduces the development cost.
Components of SRS:-The basic issues an SRS must address are
Functional Requirements Performance Requirements Design constraints
imposed on implementation External interface Requirements2.1.1
Purpose
The mobile store management will make storing of the stock
records, employee records, purchase information, and customer
information a lot easier. The supplier and sales information in the
database it will automatically generate bills when the customer
buys the mobile. The bill history can be retrieved promptly. And
reports will be generated based on different criteria
2.1.2 Scope The project could be implemented in an average sized
organization. An average company will not be very keen on spending
loads of money on ledgers. Whereas our project will greatly reduce
the costs which is using common and cheap office items like
database and desktop application. And also there is no requirement
to store books or accounts. The data is directly stored in the
database in the hard disk of the PC.
2.1.3 Overview This project Mobile store management system is
software part of the Mobile Billing management system; on improving
this software we can easily track all the Employee detail, sales
item detail and purchase detail, stock detail ,bill detail and also
we can able generate report. The main goal of the software is build
a good management tool. The Mobile Billing management will make
storing of the customer records, stock records, sales detail ,
employee information in the database it will automatically generate
bills when the customer purchase mobile. The customer purchase and
item stock history can be retrieved very promptly. And reports
should be generated based on different criterias.
2.2. Over all Description2.2.1. Product Perspective:-The product
will be developed completely independent and standalone. Each user
will have to an individual copy of the product.Mobile shop collects
and stores information about purchase, sales etc. and stores it in
the database file which can be retrieved and used when ever needed
and all the validations are performed during the entry of the data
by the user thus ensuring that the user can not enter any wrong
data which would cause problem later.
2.2.2. Product Function:- The different modules specified are
used for the indentation purpose, to make transactions based on
different criteria. This project includes graphical user interface
with simple menus, which help the user to input, process and
retrieve data with ease. This project is designed to do the
functionalities of mobile Store where in they need to keep track of
Sales log. it also describes stock record, sales record, employee
information etc.
2.2.3. User Characteristics:- The user of this product is
supposed to be fairly educated about the usage of the computers. He
should understand how to store products and he should have
knowledge about various products so that they could be saved. A
person who has no knowledge of computers will find it difficult to
understand the system. But with a little knowledge it will be very
easy to handle the project.Admin: Admin collects and stores
information about purchase, sales etc. and stores it in the
database file which can be retrieved and used when ever needed and
all the validations are performed during the entry of the data by
the user thus ensuring that the user can not enter any wrong data
which would cause problem later.User : The system allows the mobile
shop user to maintain the records of employee, goods. The user can
manage the records by adding, deleting and searching for
information, which are necessary. The system provides the facility
of viewing the report on the subject by the user.
2.2.4. General Constraints:-2.2.4.1 Log on validation:- Mobile
store management system has Login Name and Password to enter into
the system. If both are valid then only User/Admin is allowed to
enter into system. Login Name and Password can also be changed.
2.4.5. Assumption The application becomes slow when the number of
simultaneous user exceeds certain limits. The code should be free
with compilation errors or system errors. The product must have an
interface which is simple enough to understand.
2.3. Specific Requirements:-2.3.1. External Interface
Requirement:-2.3.1.1. User Interface:- JAVA and Microsoft access is
used for user interface and for maintaining Database respectively.
Java is used as a front-end application and Microsoft access is
used as a back-end application. Itemmaster Add Item Edit Item
Delete Item Sale Add Sale Delete Sale
Purchase Purchase Order
Employee Detail Add Employee Detail Daily Expense Add
Expense
Reports Stock Report Sale Report Purchase Report Employee
Report
Login Change Password2.3.1.2. Hardware Interface:- The Hardware
Requirements specify, Pentium 3 processor or higher Hard disk of
4GB capacity or more 512 RAM Standard output display Standard
qwerty keyboard 2.3.1.3. Software Interface:- The Software
Requirements specify, JDK 1.6.0 Microsoft Access database Web
server Tomcat 5.5/Tomcat 6.0 Any IDE like ECLIPSE 3.2/Netbeans
6.0.1
2.3.2. Functional Requirements:-2.3.2.1. Module 1:- Itemmaster
The Itemmaster module perform Add Item which is used to add serial
no, code no, item name, price etc. Itemmaster record can be edited
if any changes are to be needed. Another sub module is delete item
can use to delete the item.
2.3.2.2. Module 2:-Sale Sales entry form is used to enter the
sales made to the distributors and customers. Proper tracking of
all sales is very essential. Also take care to update the
stock.This page is used for enter the sales information such as
sdate, cname, caddress, item group, item name, size, qty, price,
total amount.
2.3.2.3. Module 3:-Purchase Purchase entry form is used to enter
the purchases made from the mobile companies and the suppliers.
Proper tracking of all purchases is very essential. Also take care
to update the stock.This page is used for enter the purchase
information such as pdate, dname, , item group, item name, size,
qty, price, total amount etc.,
2.3.2.4. Module 4:-Employee Details This page is used for
storing, Displaying and modifying the mobile store employees
information. The page should display the Display informations in a
grid and it should also allow the user to find out a Staff from the
database depending upon his name or id. It should provide the
necessary controls for data entry.
2.3.2.5. Module 5:-Daily Expense This is also a master entry
form to enter the details of the daily expense. All the details of
the daily expense of the user can be entered in this form.This page
is used for enter the details of daily expense such as edate, ,
item detail, amount.
2.3.2.6. Module 6:-Report This form is used to view all the
stock report, sales report, purchase report and employee report.
2.4 DESIGN CONSTRAINTSThe Mobile store management system shall be a
stand-alone system running in a Windows environment. The system
shall be developed using java and an Access database.APACHE TOMCAT
is an open source software implementation of the Java Servlet and
JavaServer Pages technologies. The Java Servlet and JavaServer
Pages specifications are developed under the Java Community
Process. Apache Tomcat is developed in an open and participatory
environment and released under the Apache License version 2. Apache
Tomcat is intended to be a collaboration of the best-of-breed
developers from around the world. We invite you to participate in
this open development project. Apache Tomcat powers numerous
large-scale, mission-critical web applications across a diverse
range of industries and organizations. Some of these users and
their stories are listed on the PoweredBy wiki page.NET BEANS
PLATFORM:Just as application servers such as GlassFish provide
lifecycle services to web applications, the NetBeans runtime
container provides them to Swing applications. Application servers
understand how to compose web modules, EJB modules, and so on, into
a single web application, just as the NetBeans runtime container
understands how to compose NetBeans modules into a single Swing
application. Modularity offers a solution to "JAR hell" by letting
developers organize their code into strictly separated and
versioned modules. Only those that have explicitly declared
dependencies on each other are able to use code from each other's
exposed packages. This strict organization is of particular
relevance to large applications developed by engineers in
distributed environments, during the development as well as the
maintenance of their shared codebase. End users of the application
benefit too because they are able to install modules into their
running applications, since modularity makes them pluggable. In
short, the NetBeans runtime container is an execution environment
that understands what a module is, handles its lifecycle, and
enables it to interact with other modules in the same application.
2.5 SYSTEM ATTRIBUTES
The coding is done with following characteristics in mind: Ease
of design to code translation Code efficiency Memory efficiency
Response time Maintainability Security Simple ease to understand
code Efficient and consistent logic
SecurityThis system is provided with authentication without
which no user can pass. So only the legitimate users are allowed to
use the application. If the legitimate users share the
authentication information then the system is open to outsiders.
ReliabilityStable database access scheme
AvailabilityThis system will only available till the system on
which it is installed is running.
MaintainabilityThere will be no maintenance required for the
software. The database is provided by the Administrator and
therefore is maintained by this Administrator. PortabilityThe
system is not portable as it is a standalone application running on
single system with no shared database
2.6 OTHER REQUIREMENTS OTHER REQUIREMENTS ARE NONE
System Design3.1 Introduction: The purpose of the Design Phase
is to a solution of the problem specified in the requirements
document. This is the first step in moving from the problem domain
to the solution domain. The design of a system is perhaps the most
critical factor affecting the quality of the software; it has a
major impact on the later phases is the Design Document. This
Document is similar to a blueprint or a plan for the solution and
is used later during implementation, testing and maintenance.The
goal of the design process is to produce a model of a system, which
can be used later to build that system. The produced model is
called design of the system.
3.2 Overview: The Design activity is often divided into separate
phases System Design and Detailed Design. System Design is
sometimes also called Top-Level Design. This system design aims to
identify and modules that should be in the system, the
specifications of these modules, and how they interact with each
other to produce the desired result. At the end of the System
Design all the major data structures, file formats, and the major
modules in the system and their specifications are decided.
3.3 Scope:This Application works in Multiple PCs installed on
multiple Computers but sharing same database by which users of
different department can use it sitting at different locations
simultaneously.But in future we can make the Application where the
database will be hosted in order to manage the all departments
which will be located in different places and by keeping domain of
Application as Online.
3.4 Background: The background entity for the MSM is mainly on
the paper work. All the documents reports where prepared and
maintained manually by the employers. So primary scope of this MSM
will reduce the paper work and to have system generated bill with
accurate calculations.
3.5 Assumption & constraints:3.5.1 Assumption: The system is
not required to save generated reports. Credit card payments are
not included The code should be free with compilation errors/syntax
errors. The product must have an interface which is simple enough
to understand.3.5.2 Constraints: The constraints of this project
are the system must support the runtime files of java and must be
able to run all the forms. Login and password is used for
identification of user and there is no facility for Customers.3.6
Applicable Documents:This software is developed for managing
employee details, inventory and billing. The sole interest is to
simulate the sanitary.As the project is user friendly, it can be
applied to large database with more information. This software can
use by any sanitary administrators to make their work simple. The
can get information quickly as possible. It can handle large volume
of data and present report whenever required. Structure of the
software Package There are mainly the following functional
components they are.. Login Add new Item Sale an Item Purchase an
Item Daily Expense View Details Employee Information Reports
Billing Exit
3.6.1 System design Alternatives Jcreator Netbeans5.5 Jboss3.6.2
RisksImage processing is more difficult in core java in order to
overcome.We can also use html coding, design is not userfriendly
its very rigid. Microsoft access to store the data unlimitedly
3.6.3 Updated Requirements Compliance MatrixSince we are using
Tomcat if there is any updates it will be automatically saved in c
drive,so the future system developers can refer to c drive.
3.7 Functional Decomposition- System descriptionThe software is
decomposed into several modules for the convenience of the client.
The mobile has to initially enter the details of the goods and
details about the employees. In this all the information are
already stored in access. Here we can add, delete or update the
existing records. This module has been designed to keep track of
all the purchases that have done by the business. We can also
update or delete the inventory item. Billing is to prepare a bill
to the customer based on their purchase.
3.7.1 System Software Architecture
Server Classloader
directory:
lib/container
default contents:
crimson.jarfacade22.jarjasper.jartomcat_modules.jartomcat_util.jarxalan.jar(if
RPM)commons-collections.jarcommons-dbcp.jarcommons-pool.jar
Webapp Classloader(s)
directory:
WEB-INF/classesWEB-INF/lib
|
Apps Classloader
directory:
lib/apps
default contents:
empty
\/
Common Classloader
directory:
lib/common
default contents:
connector_util.jarcore_util.jaretomcat.jarjasper-runtime.jarservlet.jartomcat_core.jar
|
Application Classloader
the CLASSPATH classloader
default contents:
tomcat.jar
|
JDK Extensions Classloader
directory:
jdk/jre/lib/ext
Fig 3.1 System Software Architectur
3.7.2 System Technical Architecture Handling frames and
responses using javaDatabase using Access
PC running Tomcat server
Fig 3.2 System Technical Architecture3.7.3 External InterfacesA.
Name of applicationMobile Store ManagementB. Details of interface
Admin login into the application user name & password. After
successful login enters the details of new items arrived for
instance serial no, code no, item name, price etc. Customer can
shop mobile phones admin sells to customer and generate bill. In
expense form we can details details of daily expenses. Finally the
report form is to view stock, sales, purchase & employee
reports.C. Type of interface, such as interfaces to other software
unitsAll the interfaces are java internal frames.D. Description of
operational implications of data transfer, including security
considerationsOperational implication of the data transfer is done
through validation.
3.8 Description of Programs Subsystem Specification 3.8.1
Context Flow Diagram (CFD)Context Flow Diagram is a top level (also
known as level 0) Data Flow Diagram. It is only contains one
process node, that generalize the function of the entire system in
relationship to external entities. In Context Flow Diagram the
entire system is treated as single process and all its inputs,
outputs, sinks and sources are identified and shown below.
3.8.2 Data Flow Diagram (DFD)DFD is one of the most important
modeling tools. It is used to model the system, components that
interact with the system, uses the data and information flows in
the system. DFD shows the information moves through the and how it
is modified by a series of transformations. It is a graphical
technique that depicts information moves from input or output. DFD
is also knows as bubble chart or Data Flow Graphs. DFD may be used
to represent the system at any level of abstraction. DFDs may
partitioned into a level that represents increasing information
flows and functional details.
NOTATION DESCRIPTION
Processes or transform are represented by circles in a DFD. This
shows what systems do. Each process has one or more data inputs and
produces one or more data outputs. Each process has a unique name
which appear inside the circle that represent the process in a
DFD.
The rectangle is used to represent an external entity, that is a
system element or another system that produces information for
transaction by the software or receives the information produced by
the software.
An arrow represent one or data items or data objects. A data
flow shows the flow of information from its source to its
destination.
A database is a holding place for information within the system.
It is represented by a cylindrical notation. Data stores may be
long-term files or may be short-term.
3.8.2.1 LEVEL 1(Top Level DFD):-
Fig 3.4 Top Level DFD
3.8.2.2 Second level DFD Itemmaster:-
Fig 3.5 Second level DFD-Itemmaster
3.8.2.3 Second level DFD Sale:-
Fig 3.6 Second level DFD-Sale
3.8.2.4 Second level DFD Purchase:-
Fig 3.7 Second level DFD-Purchase
3.8.2.5 Second level DFD Employee Detail:-
Fig 3.8 Second level DFD-Employee details
3.8.2.6 Second level DFD Daily Expense:-
Fig 3.9 Second level DFD- Daily expense
3.8.2.7 Second level DFD Report:-
Fig 3.10 Second level DFD- Reports
3.8.2.8 Second level DFD Login:-
Fig 3.11 Second level DFD- Login
3.9 Functional description of components:-
3.9.1 Functional component 1:Itemmaster
3.9.1.1 Input:- serial no, item name, itemgroup, code
no,description,date, color, qty,price.3.9.1.2 Output: serial no,
item name, itemgroup, code no,description, date, color, qty,price
will be stored in respective database and will be displayed in the
grid.3.9.1.3 File I/O interface:-This module is not related to
other functional components.
3.9.2 Functional component 2:Sale3.9.2.1 Input:- serialno,sdate,
cname, caddress, item group, item name, qty, price, total
amount3.9.2.2 Output :- All the entered data will be stored in
respective database and will be displayed in the grid.3.9.2.3 File
I/O interface:This module is not related to other functional
components.
3.9.3 Functional component 3:Purchase 3.9.3.1 Input:- pdate,
codeno.serialno,dealername, item group, item name, description,qty,
price, Totalamount3.9.3.2 Output :- All the entered data will be
stored in respective database and will be displayed in the grid.
3.9.3.3 File I/O interface:This module is not related to other
functional components.
3.9.3 Functional component 4:Daily Expense 3.9.4.1 Input:-
edate, detail, amount. 3.9.4.2 Output : All the entered data will
be stored in respective database and will be displayed in the grid.
3.9.4.3 File I/O interface:-This module is not related to other
functional components.
3.9.5 Functional component 5:Employee details 3.9.5.1 Input:-
empid, name.address,age,sex,designation,DOB,DOJ,experience,salary
3.9.5.2 Output:- Details of each and every employee. 3.9.5.3 File
I/O interface:-This module is not related to other functional
components.
3.9.6 Functional component 6:Login 3.9.6.1 Input:- User name and
Password. 3.9.6.2 Output:Allows administrator to enter into a new
page. 3.9.6.3 File I/O interface:-Functional components login when
clicked after giving the username and password correctly it takes
us to a new page which is the home page, with other functional
components.
Chapter 4
Database Design
4.1General InformationA database is a system intended to
organize, store, and retrieve large amounts of data easily. It
consists of an organized collection of data for one or more uses,
typically in digital form. Database design is the process of
producing a detailed data model of a database. This logical data
model contains all the needed logical and physical design choices
and physical storage parameters needed to generate a design in a
Data Definition Language, which can then be used to create a
database. A fully attributed data model contains detailed
attributes for each entity.4.2 PurposeDatabase is a simply
collection of information or data. The first step is designing a
database application is to understand what the data is to be stored
in the database, what application must be built on it and what
operators must frequent and subject to perform requirements. The
term database design can be used to describe many different parts
of the desighn of an overall database system.It also be used to
apply to the overall process of designing ,not just the data
structure,but also the forms and queries used as part of the over
all database applicationwith the database management system.
4.3 Scope This application uses MS access database to store and
retrieve information. All the fields in the table are designed
according to the values required in the project. If we have good
database then easy to locate the data or information in less time.
Using database, admin can update the data and user can access the
information. It contain a short description of the data using in
the application.
4.4 System OverviewWe are creating the application for
Technopulse company. System Title:Mobile store management. System
category: RDBMS(Relational Database Management System)A short
definition of an RDBMS may be a DBMS in which data is stored in the
form of tables and the relationship among the data is also stored
in the form of tables. Operational Status: Under Development
status. Undergoing Major Modification:Data will be stored in the
database after the development.
4.5 Acronyms and Abbreviations Uname: User name Pword: Password
Empid:Employee ID DOB: Date of Birth DOJ: Date of Join SDate:Sale
Date Cname:Customer name Caddress:Customer address Qty:Quantity
EDate:Expense date PDate:Purchase date4.6 Points of contact4.6.1
Information: TECHNOPULSE 3rd floor,city light building, Balmatta
road,mangalore-03 Contact No:425273
4.6.2 CoordinationDatabase should be secure, Security is the
degree of protection against danger, damage, loss, and criminal
activity. Security as a form of protection are structures and
processes that provide or improve security as a condition.
4.6.3 Data Owners The organization is responsible for the
security, quality, and accuracy.Data security is the protection of
the database from unauthorized users. Only the authorized persons
are allowed to access the database. Most of the users are allowed
to access a part of database i.e., the data that is related to them
or related to their department. The DBA or head of department can
access all the data in the database. Some users may be permitted
only to retrieve data, whereas others are allowed to retrieve as
well as to update data. The database access is controlled by the
DBA. He creates the-accounts of users and gives rights to access
the database. Typically, users or group of users are given username
protected by password. Most of the DBMSs provide the security
sub-system, which the DBA uses to create account of users and to
specify account restrictions. The user enters his/her account
number (or user name) and password to access the data from
database.
4.7 Database identification and description:4.7.1 Naming
conventions The relations should be verbs and Attributes should be
noun. The attributes should be multi valued or structured. Clear
and unambiguous naming. If the field is set to primary key then it
must be underlined.
4.7.2 Database Identification The database used in our
application namely Login Table Bill Table Employee info Table
Expense Table ItemMaster Table Purchase Table Sale Table Dealer
table The Itemmaster table stores the details of items like mobile
phones and its
accessories.Fields:Serial_No,itemname,itemgroup,Codeno,Description,Itemdate,color,
price,qty. The Purchase Table stores the information about purchase
details.
Fields:Serial_No,pdate,dealername,itemname,itemgroup,codeno,description,price,qtytotalamount.
The Sale Table stores the information about sales details.
Fields:Serial_
no,sdate,cname,caddress,itemname,itemgroup,Price,Qty,TotalAmount.
The Bill Table stores the bill
informationFields:maxno,billno,sdate,cname,caddress,itemname,itemgroup,Price,Qty,TotalAmount
The Employee info Table stores the employee information.
Fields:EmpID,Name,Age,Address,Sex,Designation,DOB,Experience,DOJ,Salary
The Expense table stores the information of daily expense.
Fields:EDate,Detail,Amount The Dealer table contains names of
dealers.Fields:Dealername 4.7.7 Physical structureHere the
relationship login connects the entities Admin and itemmaster.
Itemmaster contains details of sales, purchase,bill.After sale
admin produces bill.Admin is the super user it also handles details
of daily expense and keep the track of employee information to
issue salary.
4.8 ER DiagramAn Entity Relation(ER) Diagram is a specialized
graphics that illustrates the interrelationship between entities in
a database. ER diagrams often use symbols to represent 3 different
types of information. Boxes are commonly used to represent
entities. Diamonds are normally used to represent relationships and
ovals are used to represent attributes. An Entity Relationship
Model (ERM), in software engineering is an abstract and conceptual
representation of data. Entity Relationship modeling is a
relational schema database modeling method, used to produce a type
of conceptual schema or semantic data model of a system, often a
relation database, and its requirements in a top-down
fashionEntity:The thing which we want to store information. It is
an elementary basic building block of storing information about
business process. An entity represents an object defined within the
information system about which you want to store information.
Entities are distinct things in the enterprise. Boxes are commonly
used to represent entities. Relationships:A relationship is a named
collection or association between entities or used to relate two or
more entities with some common attributes or meaningful interaction
between the objects. Diamonds are normally used to represent
relationships.
Attributes:Attributes are the properties of the entities and
relationship, Descriptor of the entity. Attributes are elementary
pieces of information attached to an entity. ovals are used to
represent attributes.
It shows the key attribute of entityWhich specifies the
relationship between entity and relationship.
AdminUsernamePasswordHandlesExpenseEDateDetailsAmountEmployee
infoEmpidAgemeSalaryDOJressDOBexDesignationNameExperienceAddressSexlaryContain_detailsItemmasteritemnameDescriptionSerial_no
ItemdateColorQtyitemgroupPriceCodenoSaleQtyCaddresscnameSerialnoTotalamountitemnameitemgroupPrice
BillSDate
CnameCaddressItemgroupItemnamePriceQtyTotalamountProducesmaxno
billnoPurchasepDate
SerialnoDname
ItemnamePriceQtyTotalamountCodenoPurchase_fromDealerDnameFig 4.2
ER Diagram
4.9 Data DictionaryTable Name: Admin Login
Description: The table stores the User name and password.
Table 4.1(Admin login table)Field NameData TypeField
SizeConstraintsDescription
UsernameText50Not null,Primary keyAccount holders name
PasswordText20Not nullPassword
Table Name: Itemmaster Table
Description: The table store the information of items like
mobile phones.
Table 4.2(Itemmaster table)Field NameData TypeField
SizeConstraintsDescription
Serial_NoNumber10,0Notnull, Primary keyItem Serial number
ItemgroupText50Not nullCompany name
ItemNameText50Not nullModelName
CodenoNumber8,2Not null, Item Code
DescriptionText70Not nullItem Description
ItemdateDateNot nullDate
ColorText60Not nullColor
QtyNumber10,2Notnull,check>0Quantity
PriceNumber8,2Notnull,check>0Price
Table Name: Purchase Table
Description: The table stores the information about purchase
details
Table 4.3(Purchase table)Field NameData TypeField
SizeConstraintsDescription
Serial_NoNumber10,2Notnull, foreignkeyItem serial number
pDateDateNot nullPurchase Date
code_noNumber10,2Notnull,,Primary key Itemcode
DealerNameText50Not nullDealerName
ItemgroupText50Not nullCompany name
ItemNameText50Not nullModelName
DescriptionText50Not nullItem description
PriceNumber10,2Notnull,check>0Item Price
QtyNumber10,2Notnull,check>0Item Quantity
TotalAmountNumber8,2Notnull,check>0Total Amount
Table Name: Sale Table
Description: The table stores the information about sales
details.
Table 4.4(Sale table)Field NameData TypeField
SizeConstraintsDescription
Serial_noNumber10,2Notnull,Primary keyItem Serial number
SDateDateNot nullSale Date
CNameText50Not nullCustomer Name
CaddressText50Not nullCustomerAddress
ItemgroupText50Not nullCompany name
ItemNameText50Not nullModelName
PriceNumber10,2Notnull,check>0Item Price
QtyNumber10,2Notnull,check>0Item Quantity
TotalAmountNumber8,2Notnull,check>0Total Amount
Table Name: Bill Table
Description: The table stores the bill information
Table 4.5(Bill table)Field NameData TypeField
SizeConstraintsDescription
billnoNumber10,2Notnull,Primary keyBill number
maxnoNumber8,2Not null, check>0Maximum number
SDateDateNot nullSale Date
CNameText50Not nullCustomer Name
CaddressText50Not nullCustomer Address
ItemgroupText50Not nullCompany name
ItemNameText50Not nullModel Name
PriceNumber10,2Notnull,check>0Item Price
QtyNumber10,2Not null, check>0Item Quantity
TotalAmountNumber8,2Not null, check>0Total Amount
Table Name: Expense Table
Description: The table store expense details information
Table 4.6(Expense table)Field NameData TypeField
SizeConstraintsDescription
EdateDateNot nullExpense date
DetailText20Not nullExpense detail
AmountNumber10,2Notnull,check>0Amount
Table Name: Employee info Table
Description: The table stores the employee information.
Table 4.7(Employee table)Field NameData TypeField
SizeConstraintsDescription
EmpidNumber8,2Notnull,Primary keyEmployee id
NameText50Not nullEmployee Name
AgeNumber8,2Not nullAge
AddressText50Not nullAddress
SexText50Not nullEmployee gender
DesignationText70Not nullDesignation
DOBDateNot nullDate of birth
ExperienceNumber10,2Notnull,check>0Experience
DOJDateNotnull,doj>dobDate of join
SalaryNumber8,2Notnull,check>0Salary
Table Name: Dealer Table
Description: The table stores the Dealer names.
Table 4.8(Dealer table)Field NameData TypeField
SizeConstraintsDescription
DnameText20Not nullDealers name
4.10 Database administrative information4.10.1
ResponsibilityEssentially, the main role of a database
administrator has to do with overseeing the installation and
ongoing function of software on a system designed for use by a
number of users. There are several specific responsibilities that
the typical database administrator will perform in just about any
corporate environment.A basic responsibility for just about every
database administrator involves the installation of new databases.
As part of the database installation, the database administrator
will set up login credentials to authorized persons, define the
privileges associated with each authorized user, and ensure that
every work station attached to the network is set up to access the
new database. This process usually involves a period of
troubleshooting, in which the database administrator will
address and resolve any problems that users experience with the new
product.
There are four different types of database administrator jobs:
installation, maintenance, data modeling, and user management. A
database administrator is responsible for managing the database(s)
that are used to hold the data for large database-driven software.
Computers often play an integral role with sales team activities
and documentation tracking. Sales administrator jobs may therefore
manage information technology to minimize electronic data problems.
4.10 System Information4.11.1Database Management System (DBMS)
ConfigurationMicrosoft Access is used to create simple, as well as
complex, database solutions. It can be used both by novices and
professional developers. The product can be used 'domestically'
(such as managing Club Membership), yet can also be found in global
corporate applications, web deployments, three-tier topologies and
real-time applications.Date:2003 Version:Access 2003Version
no:11Jet Version:4.0 SP1Supported OS Windows 2000, XP, XP
Professional x64, VistaOffice suite version: Office 2003
Professional and Professional Enterprise
4.11.2 Hardware configuration:Processor133-MHz Intel
Pentium-class processor
Hard disk5Gb recommended
Memory128MB of RAM,256MB Recommended
DisplayStandard output display
KeyboardStandard Qwerty keyboard for Interface
MouseStandard mouse with two buttons
Fig 4.3 Hardware configuration
4.11.3 Database software utilities Utility software (also known
as service program, service routine, tool, or utility routine) is a
type of computer software. It is specifically designed to help
manage and tune the computer hardware, operating system or
application software, and perform a single task or a small range of
tasks; as opposed to application software which tend to be software
suites.
4.11.4 Support Software Available for Maintaining
DatabaseOperating System:Microsoft has worked under the code name
Windows 7 on the successor of Windows Vista since approximately
August 2007. The new operating system is based on Windows Vista and
comes with new programme functions and improvements in detail.
Steve Ballmer talked with a keynote onto the Gartner Symposium IT
2008 on October 16th, 2008, that Windows 7 one Windows Vista is but
with numerous improvements. It shall be release after 2.5 years
development time as a new Windows major release. The version number
is not increased to 7.0 but to 6.1 for compatibility reasons.
Through this Microsoft wants to prevent problems with programmes
which checks the version number. Microsoft introduced the first
Windows 7 test release with the build 6801 on the Professional
Developer Conference in Los Angeles onOctober 28th, 2008.Minimum
hardware requirements for Windows 7
Architecture32-bit64-bit
Processor1GHz x86 processor1GHz x86-64 processor
Memory (RAM)1GB2GB
Graphics CardDirect X9graphics processor with WDDM driver model
1.0(Not absolutely necessary; only required for Aero)
HDD free space16GB of free disk space20GB of free disk space
Optical driveDVD drive (only to install from DVD/CD Media)
4.11.5 SecurityMicrosoft Access offers several ways to secure
the application while allowing users to remain productive. The most
basic is a database password. Once entered, the user has full
control of all the database objects. This is a relatively weak form
of protection which can be easily cracked.A higher level of
protection is the use of workgroup security requiring a user name
and password. Users and groups can be specified along with their
rights at the object type or individual object level. This can be
used to specify people with readonly or data entry rights but may
be challenging to specify. A separate workgroup security file
contains the settings which can be used to manage multiple
databases. Workgroup security is not supported in the Access 2007
ACCDB database format, although Access 2007 still supports it for
MDB databases.Databases can also be encrypted. The ACCDB format
offers significantly advanced encryption from previous
versions.Additionally, if the database design needs to be secured
to prevent changes, Access databases can be locked/protected (and
the source code compiled) by converting the database to a .MDE
file. All changes to the VBA project (modules, forms, or reports)
need to be made to the original MDB and then reconverted to MDE. In
Access 2007, the ACCDB database is converted to an ACCDE file. Some
tools are available for unlocking and "decompiling", although
certain elements including original VBA comments and formatting are
normally irretrievable.4.12 Storage RequirementsOur application can
store in c drive.Capacity:83,780,169,728 bytes 78.0 GBTools:Error
Checking Defragmentation Back up Hardware
All Devices:
NameType
Generic Flash Disk USB DriveDisk Drives
Hitachi S545016139A3000Disk Drives
MATSHITA DVD RAM UJ890ASATADVD/CD
Fig 4.4 Storage Requirements
4.13 RecoveryNumerous occurrences could lead to data loss: data
or database elements could be accidentally deleted; data could
become corrupted by the addition of bad data; hardware, such as a
disk or server, could fail; or disasters, such as flooding, could
destroy your server and storage media. Since we are using access
data in database is automatically stored in c drive.
Backup
The simplest backup technique is the Dump.You need to store the
data in the database twice. as dumping is expensive, it probably
cannot be performed as often as one would like.Another backup
technique is we can store our information in Hard Disk,Tape
drive,DVD.A hard disk drive (HDD) is a non-volatile, random access
device for digital data. It features rotating rigid platters on a
motor-driven spindle within a protective enclosure. Data is
magnetically read from and written to the platter by read/write
heads that float on a film of air above the platters.Hard disk
manufacturers quote disk capacity in multiples of SI-standard
powers of 1000, where a terabyte is 1000 gigabytes and a gigabyte
is 1000 megabytes. With file systems that report capacity in powers
of 1024, available space appears somewhat less than advertised
capacity.
Detailed Design
5.1 IntroductionThis section describes which are the modules
required for implementing the system. This is done in informal
design. Formal design describes the internal of each modules, it
describes the logic implemented in that module to perform the
desired function, it shows what inputs are given and what outputs
are coming from that module and how operations are performed on
inputs to get outputs.The design document is the developers
blueprint. It provides precious directions to software programmers
about how basic control and data structures will be organized. The
Design document is written before programming starts. It describes
how the software will be structured and what functionality will be
included. This document forms the basis for all future design and
coding.
5.2 Applicable DocumentsThis software is developed for managing
employee details, inventory and billing. The sole interest is to
simulate the sanitary.As the project is user friendly, it can be
applied to large database with more information. This software can
use by any sanitary administrators to make their work simple. The
can get information quickly as possible. It can handle large volume
of data and present report whenever required.
5.3 Structure of the software Package5.3.1 Functional
ComponentsThe functional components identified during the system
design are listed here: Functional component 1: Itemmaster
Functional component 2: Sale Functional component 3: Purchase
Functional component 4: Daily Expense Functional component 5:
Employee Information Functional component 6: Reports Functional
component :7 Login
5.4 Hierarchical Diagram
Sale Purchase Daily
ExpenseItemmasterReportsStockPurchaseEmployee detailsSalesMobile
Store ManagementAdd itemAddShow allEdit itemUpdateDelete
itemDeleteAdd saleSaveShow allDelete SaleDeleteGenerate
billPurchase OrderSaveShow allEmployee detailsAdd employee
detailsSaveShow allUpdateDeleteeAdd expensesaveShow allLoginChange
passwordChange
Fig 5.1 Hierarchical Diagram
5.5 Modular Decomposition of components5.5.1 Itemmaster5.5.1.1
Design AssumptionsAfter successful login enters the details of new
items arrived for instance serial no, code no, item name, price,qty
etc., 5.5.1.2 Itemmaster moduleSub modules are:Add
item,Edit,Delete. 5.5.1.3 Structured chart
ItemmasterAdd itemEditDelete itemItemname,Price,qtyqtyDelete
selected itemedit selected itemItemname,Price,qtyqty
Fig 5.2(a) Structured chart: Itemmaster
5.5.1.4 Data Structures shared among modulesTable used is
itemmaster . 5.5.2 Sale5.5.2.1 Design AssumptionsIf there is any
sales on the particular date details of the sale are added for
instance sdate, customer name, company name, total amount.5.5.2.2
Sales module Sub modules are:Add Sales, Delete sale.
Program Code6.1 Introduction:
The goal of coding or programming activity is to implement the
design in the best possible manner. The coding activity affects
both testing and maintenance profoundly. The goal of coding should
be to reduce the testing and maintenance effort. Hence,during
coding the focus should be on developing programs that are easy to
read and understand, and simply on developing programs that are
easy to write.
Code for Login form: import java.awt.*;import
javax.swing.*;import java.awt.event.*;import java.sql.*;
public class LoginForm extends JFrame implements
ActionListener{JDialog myDialog;MobMain parent;JButton
b1;Connection con;Statement s;ResultSet rs;JTextField t1;
JPasswordField t2; JLabel L1,L2,L3;public LoginForm(MobMain
parent1){this.parent=parent1;myDialog = new JDialog(parent,"Login
Form");myDialog.setLayout(new FlowLayout());JPanel mypanel = new
JPanel(new GridLayout(4,1));JPanel panelUser = new JPanel(new
GridLayout(1,2));
L1=new JLabel("User Name");panelUser.add(L1);t1= new
JTextField(10);panelUser.add(t1);mypanel.add(panelUser);
JPanel panelPass = new JPanel(new GridLayout(1,2));L2=new
JLabel("Password");panelPass.add(L2);t2=new
JPasswordField(10);panelPass.add(t2);mypanel.add(panelPass);
JPanel panelButton = new JPanel(new
FlowLayout(FlowLayout.CENTER));b1=new
JButton("login");b1.addActionListener(this);panelButton.add(b1);mypanel.add(panelButton);mypanel.add(new
JLabel());myDialog.add(mypanel);pack();myDialog.setSize(400,200);myDialog.setLocation(300,300);myDialog.setVisible(true);myDialog.addWindowListener(new
WindowAdapter() {public void windowClosing(WindowEvent we){
myDialog.dispose(); System.exit(0); } });}
public void actionPerformed(ActionEvent ae){ String user=null;
String pass=null; if(ae.getSource()==b1) { try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11"); s =
con.createStatement(); rs=s.executeQuery("select * from userlog
where name='" + t1.getText() + "' and password='" + t2.getText() +
"'"); while(rs.next()) {
System.out.println("hsfhfsdkfhjksdhfksdf"); parent.initial();
myDialog.dispose(); dispose(); } }catch(Exception ea){}}}}
Main form:import java.awt.*;import javax.swing.*;import
java.awt.event.*;import javax.swing.JDesktopPane;import
javax.swing.JComponent;import java.io.File;import
java.io.IOException;import javax.imageio.ImageIO;import
javax.swing.ImageIcon;import java.sql.*;
public class MobMain extends JFrame implements
ActionListener{private JDesktopPane desktop;
private Image img;private JMenuBar mb;private JMenu
menu1;private JMenu menu2;private JMenu menu3;private JMenu
menu4;private JMenu Cmenu1;private JMenuItem M5;private JMenu
menu6;private JMenu menu7;private JMenu menu10;private JMenuItem
Menu6;private JMenuItem M1;private JMenuItem M2;private JMenuItem
M3;private JMenuItem M4;private JMenuItem Cmenu;private JMenuItem
M6;private JMenuItem M7;private JMenuItem M8;private JMenuItem
M9;private JMenuItem M10;private JMenuItem M11;private JMenuItem
M12;private JMenuItem M13;private JMenuItem S1;private JMenuItem
S2;private JMenuItem Se1;private JMenuItem Se2;private JMenuItem
Se3; private JMenuItem Se4;
public static int status=0;public JFrame mainframe; Dimension
screen;
public MobMain(){super("Mobile Management");desktop = new
JDesktopPane();screen =
java.awt.Toolkit.getDefaultToolkit().getScreenSize();setSize(screen.width,screen.height-30);Container
c = new Container();c.setBackground(Color.GREEN);
mb=new JMenuBar();menu1=new JMenu("ITEM MASTER");menu2=new
JMenu("SALES MASTER");menu3=new JMenu("PURCHASE MASTER"); menu6=new
JMenu("DAILY EXPENSE");menu4=new JMenu("EMPLOYEE
DETAILS");menu7=new JMenu("VIEW DETAILS");menu10=new
JMenu("REPORTS");Cmenu1=new JMenu("LOGIN");
M1= new JMenuItem("Add New Item");M1.addActionListener(this);
M2=new JMenuItem("Edit Item");M2.addActionListener(this);M3=new
JMenuItem("Delete Item");M3.addActionListener(this);M7=new
JMenuItem("Exit");M7.addActionListener(this);M5=new
JMenuItem("Delete Item");M5.addActionListener(this);M4= new
JMenuItem("Add Employee
Details");M4.addActionListener(this);menu6.add(Menu6=new
JMenuItem("Add
Expense"));Menu6.addActionListener(this);menu2.add(Se1=new
JMenuItem("Add Sales"));
Se1.addActionListener(this); Cmenu = new JMenuItem("Change
Password");Cmenu.addActionListener(this);M6=new JMenuItem("Purchase
Order");M6.addActionListener(this);M10=new JMenuItem("Stock
report");M10.addActionListener(this);M11=new JMenuItem("Sales
report");M11.addActionListener(this);M12=new JMenuItem("Purchase
report");M12.addActionListener(this);M13=new JMenuItem("Employee
report");M13.addActionListener(this);
menu1.add(M1);menu1.add(M2);menu1.add(M5);menu4.add(M4);menu1.add(M7);menu10.add(M10);menu10.add(M11);menu10.add(M12);menu10.add(M13);Cmenu1.add(Cmenu);menu2.add(M3);menu6.add(Menu6);menu3.add(M6);mb.add(menu1);mb.add(menu2);mb.add(menu3);mb.add(menu4);mb.add(menu6);mb.add(menu10);mb.add(Cmenu1);add(mb);new
LoginForm(this);
mainframe =new JFrame(); mainframe.setJMenuBar(mb);
mainframe.setContentPane(desktop);
mainframe.setSize(screen.width,screen.height-30);mainframe.addWindowListener(new
WindowAdapter() { public void windowClosing(WindowEvent we)
{mainframe.dispose();System.exit(0); } }); }public void initial(){
mainframe.setVisible(true);}public void paint(Graphics g){ Image
image= Toolkit.getDefaultToolkit().getImage("C:\\Documents and
Settings\\mobilemgm\\src\\images\\slider-mobile-phones.jpg");
g.drawImage(image,0,0,getSize().width,getSize().height,this);
super.paint(g);}public static void main(String args[]){ new
MobMain(); }public void actionPerformed(ActionEvent ae){ if
(ae.getSource()==M1) { System.out.println(M1); AddItem ed=new
AddItem(); ed.jScrollPane3.setVisible(false);
ed.jButton5.setVisible(false); desktop.add(ed);
ed.setVisible(true); } if(ae.getSource()==M13) {
System.out.println(M2); Empinfor empf=new Empinfor();
desktop.add(empf); empf.setVisible(true); } if(ae.getSource()==M7){
System.exit(1); } if(ae.getSource()==M6) { purchase p=new
purchase(); desktop.add(p); p.setVisible(true);
p.jScrollPane2.setVisible(false); p.jButton5.setVisible(false); }
if(ae.getSource()==Menu6) { DialyExpense DE=new DialyExpense();
DE.jScrollPane2.setVisible(false); DE.jButton5.setVisible(false);
desktop.add(DE); DE.setVisible(true); } if(ae.getSource()==M10) {
stockreport sr=new stockreport(); desktop.add(sr); Connection
con=null; Statement st=null; ResultSet rs=null; try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement(); rs=st.executeQuery("select
modelname,qty,companyname,price from itemmaster "); int li_row = 0;
while (rs.next()) { System.out.println("hello");
sr.jTable1.setValueAt(rs.getString(1), li_row, 0);
sr.jTable1.setValueAt(rs.getInt(2), li_row, 1);
sr.jTable1.setValueAt(rs.getString(3), li_row, 2);
sr.jTable1.setValueAt(rs.getInt(4), li_row, 3); li_row++; }
}catch(Exception e){} sr.jTable1.setVisible(true);
sr.setVisible(true); } if(ae.getSource()==M5) { DeleteItem
Eitem=new DeleteItem(); desktop.add(Eitem); Eitem.setVisible(true);
} if(ae.getSource()==M2) { EditItem aitem=new EditItem();
desktop.add(aitem); aitem.setVisible(true); }
if(ae.getSource()==Se1) { sale sitem=new sale();
desktop.add(sitem); sitem.setVisible(true);
sitem.jScrollPane2.setVisible(false);
sitem.jButton5.setVisible(false); } if(ae.getSource()==M3) {
DelSale DS=new DelSale(); desktop.add(DS); DS.setVisible(true); }
if(ae.getSource()==M11) { salesReport sr=new salesReport();
desktop.add(sr); sr.setVisible(true); } if(ae.getSource()==M12) {
purchaseR pr=new purchaseR(); desktop.add(pr); pr.setVisible(true);
} if(ae.getSource()==M4) { Empinfo1 EI=new Empinfo1();
EI.jLabel13.setVisible(false); EI.jScrollPane2.setVisible(false);
EI.jButton6.setVisible(false); desktop.add(EI);
EI.setVisible(true); } if(ae.getSource()==Cmenu) {
System.out.println(ae.getSource()); changeP cp=new changeP();
desktop.add(cp); cp.setVisible(true); } }}
Add item form:
import java.awt.Color;import javax.swing.JInternalFrame;import
java.sql.*;import java.text.SimpleDateFormat;import
java.util.*;import java.text.*;import javax.swing.*;import
javax.swing.JOptionPane.*;import javax.swing.JDesktopPane;import
java.util.Date.*;import java.util.Calendar;import
javax.swing.*;import java.awt.*;import
javax.swing.table.AbstractTableModel;
public class AddItem extends JInternalFrame { Connection con;
private JDesktopPane desktop; Statement st; ResultSet rs; public
AddItem() { initComponents(); } private void
jButton5MouseClicked(java.awt.event.MouseEvent evt) {
jScrollPane3.setVisible(false); jButton5.setVisible(false); }
private void jTextField1ActionPerformed(java.awt.event.ActionEvent
evt) { Connection con=null; Statement st=null; ResultSet rs=null;
int max2=0; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement(); String sql3="select max(Serial_no) from
itemmaster"; rs=st.executeQuery(sql3); while(rs.next()) {
max2=rs.getInt(1); System.out.println(max2); if(max2==0) {
max2=101; jTextField1.setText(Integer.toString(max2)); }else {
jTextField1.setText(Integer.toString(max2++)); } } }catch(Exception
e){} } private void
jTextField1MouseClicked(java.awt.event.MouseEvent evt) { Connection
con=null; Statement st=null; ResultSet rs=null; int max2=0; try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement(); String sql3="select max(Serial_no) from
itemmaster"; rs=st.executeQuery(sql3); while(rs.next()) {
max2=rs.getInt(1); System.out.println(max2); if(max2==0) {
max2=101; jTextField1.setText(Integer.toString(max2)); } else {
max2=max2+1; jTextField1.setText(Integer.toString(max2)); } }
}catch(Exception e){} } private void
jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
System.out.println("hello"); int row_count=0; Connection con=null;
Statement st=null; ResultSet rs=null; try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement(); String sql1="select
serial_no,modelname,description,qty,Price from itemmaster ";
rs=st.executeQuery(sql1); int li_row = 0; while (rs.next()) {
System.out.println("hello"); jTable2.setValueAt(rs.getString(1),
li_row, 0); jTable2.setValueAt(rs.getString(2), li_row, 1);
jTable2.setValueAt(rs.getString(3), li_row, 2);
jTable2.setValueAt(rs.getString(4), li_row, 3);
jTable2.setValueAt(rs.getString(5), li_row, 4); li_row++; }
}catch(Exception e){} } private void
jButton4MouseClicked(java.awt.event.MouseEvent evt) {
jScrollPane3.setVisible(true); jTable2.setVisible(true);
jButton5.setVisible(true); int row_count=0; Connection con=null;
Statement st=null; ResultSet rs=null; String str=null; int count=0;
try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement(); String sql1="select
serial_no,modelname,description,qty,Price from itemmaster ";
rs=st.executeQuery(sql1); int li_row = 0; while (rs.next()) {
System.out.println("hello"); jTable2.setValueAt(rs.getString(1),
li_row, 0); jTable2.setValueAt(rs.getString(2), li_row, 1);
jTable2.setValueAt(rs.getString(3), li_row, 2);
jTable2.setValueAt(rs.getString(4), li_row, 3);
jTable2.setValueAt(rs.getString(5), li_row, 4); li_row++; }
str="select count(*) from itemmaster1"; rs=st.executeQuery(str);
while(rs.next()) { count=rs.getInt(1); System.out.println(count); }
}catch(Exception e){} } private void
jTextField1FocusGained(java.awt.event.FocusEvent evt) { Connection
con=null; Statement st=null; ResultSet rs=null; int max2=0; try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("odbc:odbc:mob11");
st=con.createStatement(); String sql3="select max(Serial_no) from
itemmaster"; rs=st.executeQuery(sql3); while(rs.next()) {
max2=rs.getInt(1); System.out.println(max2); if(max2==0) {
max2=101; jTextField1.setText(Integer.toString(max2)); } else {
max2=max2+1; jTextField1.setText(Integer.toString(max2)); } }
}catch(Exception e){} } private void
jTextField4FocusGained(java.awt.event.FocusEvent evt) {
java.util.Date d=new java.util.Date(); SimpleDateFormat dateFormat
= new SimpleDateFormat("dd/MM/yyyy");
jTextField4.setText(dateFormat.format(d)); } private void
jButton2MouseClicked(java.awt.event.MouseEvent evt) {
jTextField9.setText(""); jTextField1.setText("");
jTextField2.setText(""); jTextField3.setText("");
jTextField4.setText(""); jTextField5.setText("");
jTextField6.setText(""); jTextField7.setText("");
jTextField8.setText(""); } private void
jButton3MouseClicked(java.awt.event.MouseEvent evt) {
this.dispose(); } private void
jButton1MouseClicked(java.awt.event.MouseEvent evt) { if
(jTextField9.getText().equals("") ||
jTextField1.getText().equals("") ||
jTextField2.getText().equals("") ||
jTextField3.getText().equals("") ||
jTextField4.getText().equals("") ||
jTextField5.getText().equals("") ||
jTextField6.getText().equals("") ||
jTextField7.getText().equals("") ||
jTextField8.getText().equals("")) {
JOptionPane.showMessageDialog(null,"Feilds Cannot be Empty"); }
else { try { int i=1,count=0; String s1=null,s2=null; Connection
con=null; Statement st=null; String str=null; ResultSet rs=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11"); st =
con.createStatement(); str="select modelname,companyname from
itemmaster where modelname='"+jTextField9.getText()+"' and
companyname='"+jTextField5.getText()+"' "; System.out.println(str);
rs=st.executeQuery(str); while(rs.next()) { s1=rs.getString(1);
s2=rs.getString(2); }
if((jTextField9.getText().equalsIgnoreCase(s1)) &&
(jTextField5.getText().equalsIgnoreCase(s2))) {
JOptionPane.showMessageDialog(null,"Item already present....."); }
else { str="insert into
itemmaster(Serial_no,ModelName,Companyname,CodeNo,
Description,Stdno,Color,Qty,Price)
values('"+jTextField1.getText()+"',
"+jTextField9.getText()+"','"+jTextField5.getText()+"',
'"+jTextField8.getText()+"','"+jTextField7.getText()+"',
'"+jTextField4.getText()+"','"+jTextField6.getText()+"',
"+jTextField2.getText()+","+jTextField3.getText()+")";
System.out.println(str); i=st.executeUpdate(str); if(i==1) {
JOptionPane.showMessageDialog(null,"Item Added to Stock"); } else {
JOptionPane.showMessageDialog(null,"Unsuccessful Attempt"); } } }
catch(Exception e) { e.printStackTrace(); e.getMessage();} } }
private void jButton1ActionPerformed(java.awt.event.ActionEvent
evt) {
if (jTextField9.getText().equals("") ||
jTextField1.getText().equals("") ||
jTextField2.getText().equals("") ||
jTextField3.getText().equals("") ||
jTextField4.getText().equals("") ||
jTextField5.getText().equals("") ||
jTextField6.getText().equals("") ||
jTextField7.getText().equals("") ||
jTextField8.getText().equals("")) {
JOptionPane.showMessageDialog(null,"Feilds Cannot be Empty"); }
else { try { int i=1,count=0; Connection con=null; Statement
st=null; String str=null; ResultSet rs=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11"); st =
con.createStatement(); str="select modelname,companyname from
itemmaster where modelname= '"+jTextField9.getText()+"' and
companyname='"+jTextField5.getText()+"' "; rs=st.executeQuery(str);
while(rs.next()) {
if((rs.getString(1).equalsIgnoreCase(jTextField9.getText()))
&&
(rs.getString(2).equalsIgnoreCase(jTextField5.getText()))) {
JOptionPane.showMessageDialog(null,"Item already present....."); }
else { str="insert into
itemmaster(Serial_no,ModelName,Companyname,CodeNo,
Description,Stdno,Color,Qty,Price)
values('"+jTextField1.getText()+"',
'"+jTextField9.getText()+"','"+jTextField5.getText()+"','"+jTextField8.getText()+"',
'"+jTextField7.getText()+"','"+jTextField4.getText()+"','"+jTextField6.getText()+"',
"+jTextField2.getText()+","+jTextField3.getText()+")";
System.out.println(str); i=st.executeUpdate(str); if(i==1) {
JOptionPane.showMessageDialog(null,"Item Added to Stock");
jTextField1.setText(""); jTextField9.setText("");
jTextField8.setText(""); jTextField7.setText("");
jTextField6.setText(""); jTextField5.setText("");
jTextField4.setText(""); jTextField3.setText("");
jTextField2.setText(""); } else {
JOptionPane.showMessageDialog(null,"Unsuccessful Attempt"); } }}}
catch(Exception e) { e.printStackTrace(); e.getMessage();} } }
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() { public void run()
{ new AddItem().setVisible(true); } }); } } Edit item form:
import javax.swing.JInternalFrame;import
com.sun.media.sound.Toolkit;import
com.sun.org.apache.bcel.internal.classfile.JavaClass;import
java.sql.*;import java.text.SimpleDateFormat;import
java.util.*;import java.text.*;import javax.swing.*;import
javax.swing.JOptionPane.*;import javax.swing.JDesktopPane;
public class EditItem extends JInternalFrame { public EditItem()
{ initComponents(); } private void
jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {
Connection con=null; Statement st=null; ResultSet rs=null; try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement(); String str="select distinct(modelname)
from itemmaster"; rs=st.executeQuery(str); while(rs.next()) {
jComboBox1.addItem(rs.getString(1)); } }catch(Exception e){} }
private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {
Connection con=null; Statement st=null; ResultSet rs=null; int j=1;
try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement(); String sql1="update itemmaster set
description='"+jTextField1.getText()+"',
color='"+jTextField2.getText()+"',price='"+jTextField6.getText()+"',
companyname='"+jTextField5.getText()+"',qty='"+jTextField3.getText()+"'
where modelname='"+jComboBox1.getSelectedItem()+"'";
j=st.executeUpdate(sql1); System.out.println("j="+j); if(j==1) {
JOptionPane.showMessageDialog(null,"Record Updated Successfully");
} else { JOptionPane.showMessageDialog(null,"Record Update
Failure"); } }catch(Exception
e){e.printStackTrace();e.getMessage();} } private void
jComboBox1ItemStateChanged(java.awt.event.ItemEvent evt) { String
val=jComboBox1.getSelectedItem().toString(); Connection con=null;
Statement st=null; ResultSet rs=null; try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement(); rs=st.executeQuery("Select
description,color,price,companyname,stdno,qty from itemmaster where
modelname='"+val+"'"); while(rs.next()) {
jTextField1.setText(rs.getString(1));
jTextField2.setText(rs.getString(2));
jTextField6.setText(rs.getString(3));
jTextField5.setText(rs.getString(4));
jTextField4.setText(rs.getString(5));
jTextField3.setText(rs.getString(6)); }
User Interface7.1 InterfacesLogin Screen:
The user need to enter the valid user name and password if both
are valid then the login is success and the user is allowed to
enter into the mobile store management system. When the user enters
the wrong username or password login is failed.
Itemmaster module:
Here the user can add, update and delete the item as when he
needs.
Add item form:
Here the user can add newly arrived items. The items will then
appear in the grid and will be stored in database.Edit item
form:
Here the admin can update details of item that is stored in
database. Here the admin selects item name from combo box, and he
can update item details and updated details will be stored in
database. Delete item form:
Here the admin can delete details of item that is stored in
database. Here the admin selects the item name from combo box and
when he clicks delete button, item deleted successfully dialog box
will be displayed.
VI. CONCLUSION
The project Mobile Store Management has been created with the
intention of providing an user with application which will suffice
all needs for the details of mobile phones and other updates.All
the requirements specifications was followed as for as possible and
few additional features were added that can make the application
more user friendly and less complicated.The project Mobile Store
Management has been developed with the proper guidance from the
client.A fully fledged user manual for this system is provided to
the user for future working and functional references.We hope that
Mobile Store Management fulfils all the needs in possible manner.
Limitations: Employee has to go through many records to find any
particular transaction, which can take up a lot of time and effort.
In case casher forgot any items code it is difficult to calculate
the amount, it can create some other problem. End user should have
the basic knowledge of the computers.
Future enhancement: This involves provided new future such as
More number item details can be inserted into the database. It can
be integrated with the web for universal access. E-payment
Upgrading the performance.
VII. BIBLIOGRAPHY
TITLEAUTHORPUBLISHERYEAR
Fundamentals of database systemsElmasri and B.NavatheAddison
Wesley Longman1997
The complete reference java IIHerbert schildtTMH1997
System Analysis and Design IVth EditionIgor
HawryszlsiewyczTMH1998
An Integrated Approach to Software EngineeringPankaj Jalote.
NAROSA PUBLISHING HOUSE1997
The Java Hand book Tata McGraw Hill EditionPatrick Naughton.
TMH1997
68