Sunteți pe pagina 1din 32

Chapter 1

INTRODUCTION

1.1 Purpose

The main purpose of this study is to boost the study of votes. For this purpose we have
to view all aspects responsible for low turnout. Some people hesitate to vote due to weather
conditions in different areas during the election, youngsters of age group 18-24 having no charm
to cast the vote. People who are outside their town/city don’t want to come to their area for just
casting the votes due to the expenses and trouble of transportation. Same situation is also for those
who are on duty during the election, they don’t have any interest to cast their vote during job or
they don’t have facility to submit their vote.

A second purpose is to make it more difficult to commit fraud and cheating during an election. In a
normal voting system people are registered in more than one area and thus cast the vote multiple
times. By creating an online database covering the entire country it will be possible to eliminate the
casting of double votes. After looking above factors, the decision for online voting is more natural
than before. The expenditure of an election will be decreased and it will cover people of all ages. It
will be a facility for the people who have different problems as mentioned earlier.

An Online Voting System is a DBMS based project that helps to solve the above problems.
This has been made in a user friendly interface.

1.2 Overview

 There is an administrator module.


 Admin – The admin can check, add and remove elections.
 Voter – The voter can cast a vote to the candidate he wishes to elect in a particular election. He
cannot vote more than once in the same election.
 Candidate – The candidate can nominate himself for the post he election is offering.
 Other operations – The candidate and voter can update their database. The admin selects the
candidate for the election. The admin sets the duration of election and select the candidates for
the election.

PAGE 1
1.3 Front end tools

These are the tools which are used to design the user interface of the application
Example Visual basic, ASP.NET, Java, C, C++, PHP, HTML, JSP etc.

The tools used for the project are:

1.3.1 ASP.NET: ASP.NET is an open-source server-side web application framework designed for
web development to produce dynamic web pages. It is built on the Common Language Runtime
(CLR) of the .Net framework and includes those benefits like multi-language interoperability,
type safety, garbage collection and inheritance.

1.3.2 HTML: HTML is the main markup language for displaying web pages and other information
that can be displayed in a web browser. HTML is written in the form of HTML elements
consisting of tags enclosed in angle brackets (like <html>), within the web page content.

1.3.3 CSS: CSS is designed primarily to enable the separation of document content (written in
HTML or a similar markup language) from document presentation, including elements such
as the layout, colors, and fonts. This separation can improve content accessibility, provide
more flexibility and control in the specification of presentation characteristics.

1.4 Back End Tools

These are the tools which are used to design data base (storage design) of the application
Example MySQL, MS-Access, Oracle, DB2 etc.
The tools used for this project is:

1.4.1 MySQL: MySQL is the world's most used open source relational database management
system (RDBMS) that runs as a server providing multi-user access to a number of databases
and was first released in May 1995. The SQL phrase stands for Structured Query Language.
MySQL is a popular choice of database for use in web applications. Free-software-open source
projects that require a full-featured database management system often use MySQL. MySQL
is an RDBMS and ships with no GUI tools to administer MySQL databases or manage data
contained within the databases

PAGE 2
1.5 DBMS

A Database Management System (DBMS) is a set of programs that enables you to store,
modify, and extract information from a database, it also provides users with tools to add, delete,
access, modify, and analyze data stored in one location. A group can access the data by using
query and reporting tools that are part of the DBMS or by using application programs
specifically written to access the data. DBMS’s also provide the method for maintaining the
integrity of stored data, running security and user access, and recovering information if the
system fails. The information from a database can be presented in a variety of formats. Most
DBMSs include a report writer program that enables you to output data in the form of a report.

Many DBMSs also include a graphics component that enables you to output
information in the form of graphs and charts. Database and database management system are
essential to all areas of business and they must be carefully managed. There are many different
types of DBMSs, ranging from small systems that run on personal computers to huge systems
that run on mainframes. The following are examples of database applications: computerized
library systems, flight reservation systems, and computerized parts inventory

systems. It typically supports query languages, which are in fact high-level programming
languages, dedicated database languages that considerably simplify writing database
application programs.

Database languages also simplify the database organization as well as retrieving and
presenting information from it. A DBMS provides facilities for controlling data access,
enforcing data, managing concurrency control, and recovering the database after failures and
restoring it from backup files, as well as maintaining database security.

 DBMS engine accepts logical requests from various other DBMS subsystems, converts them
into physical equivalents, and actually accesses the database and data dictionary as they exist
on a storage device.
 Data definition subsystem helps the user create and maintain the data dictionary and define
the structure of the file in a database.
 Data manipulation subsystem helps the user to add, change, and delete information in a
database and query it for valuable information. Software tools within the data manipulation

PAGE 3
subsystem are most often the primary interface between user and the information contained in
a database. It allows the user to specify its logical information requirements.
 Application generation subsystem contains facilities to help users develop transaction-
intensive applications. It usually requires that the user perform a detailed series of tasks to
process a transaction. It facilitates easy-to-use data entry screens, programming languages, and
interfaces.
 Data administration subsystem helps users manage the overall database environment by
providing facilities for backup and recovery, security management, query optimization,
concurrency control, and change management.

PAGE 4
Chapter 2

DATABASE MANAGEMENT SYSTEM

The term database refers to the collection of related records, and the software
should be referred to as the database management system or DBMS. Typically, for a given
database, there is a structural description of the type of facts held in that database. This
description is known as a database schema. The schema describes the objects that are
represented in the database, and the relationships among them. There are a number of different
ways of organizing a schema, that is, of modeling the database structure. These are known as
database models (or data models). The model that is in most common use today is the
relational model.
A database is a collection of related data. A database has the following implicit properties.

 A database represents some aspects of the real world, sometimes called the mini-world.
Changes to the mini-world are reflected in the database.
 A database is a logical coherent collection of data with some inherent meaning. A random
assortment of data cannot be called database.
 A database is designed, built and populated with data for a specific purpose.
A database can be understood as a collection of related files. How those files are related
depends on the model used. Early models included the hierarchical model (where files are
related in a parent/child manner, with each child file having at most one parent file), and the
network model (where files are related as owners and members, similar to the network model
except that each member file can have more than one owner).

Three key terms are used extensively in relational database models: relations, attributes, and
domains. A relation is a table with columns and rows. The named columns of the relation are
called attributes, and the domain is the set of values the attributes are allowed to take. The
basic data structure of the relational model is the table, where information about a particular
entity represented in columns and rows (also called tuples). Thus, the "relation" in "relational
database" refers to the various tables in the database; a relation is a set of tuples. The columns
enumerate the various attributes of the entity and a row is an actual instance of the entity that
is represented by the relation.

PAGE 5
An understanding of relational databases requires an understanding of some of the terms.

 A database is a collection of tables.


 Each table contains records, which are the horizontal rows in the table. These are also called
tuples.
 Each record contains fields, which are the vertical columns of the table. These are also
called attributes. An example would be a product record.
 Fields can be of many different types. There are many standard types, and each DBMS
(database management system, such as Oracle or MySQL) can also have their own specific
types, but generally they fall into at least three kinds - character, numeric and date. For example,
a product description would be a character field, a product release date would be a date field,
and a product quantity in stock would be a numeric field.
 The domain refers to the possible values each field can contain (it's sometimes called a field
specification). For example, a field entitled "marital_status" may be limited to the values
"Married" and "Unmarried".
 A field is said to contain a null value when it contains nothing at all. Fields can create
complexities in calculations and have consequences for data accuracy. For this reason, many
fields are specifically set not to contain NULL values.
 A key is a logical way to access a record in a table. For example, in the product table, the
product_id field could allow us to uniquely identify a record. A key that uniquely identifies a
record is called a primary key.
 An index is a physical mechanism that improves the performance of a database. Indexes are
often confused with keys. However, strictly speaking they are part of the physical structure,
while keys are part of the logical structure.
 A view is a virtual table made up of a subset of the actual tables.
 A one-to-one (1:1) relationship occurs where, for each instance of table A, only one instance
of table B exists, and vice-versa. For example, each vehicle registration is associated with only
one engine number, and vice-versa A one-to-many (1:m) relationship is where, for each
instance of table A, many instances of the table B exist, but for each instance of table B, only
once instance of table A exists.

PAGE 6
 A one-to-many (1: m) relationship is where, for each instance of table A, many instances of the
table B exist, but for each instance of table B, only once instance of table A exists.
 A many to many (m: n) relationship occurs where, for each instance of table A, there are many
instances of table B, and for each instance of table B, there are many instances of the table A.
 A mandatory relationship exists where, for each instance of table A, one or more instances of
table B must exist.
 An optional relationship is where, for each instance of table A, there may exist instances of
table B.
 Data integrity describes the accuracy, validity and consistency of data.

2.1 How is database approach different from file system?

In traditional file processing, each user defines and implements the files needed for
specific software application. For example, one user keeps the details of the supplier and
customers. A second user keeps the details of the goods and the third user keeps track of the
bills and their payments. This redundancy in defining and storing the data, results in wasted
storage space and in redundant efforts to maintain common update data. In database approach,
a single repository of data is maintained that is defined once and then accessed by various users.

In file system, each application is free to name data elements independently. In contrast, the
names or labels’ is defined once, and used repeatedly by quires, transaction, and application.
The main characteristics of database approach versus file system are:
 Self describing nature of a database system
 Insulation between programs and data, and data abstraction
 Sharing of data and multi-user transaction processing.

2.2 DBMS Languages

Data Definition Language (DDL) is the language used to specify the conceptual
schema of a database. In many DBMSs, the DDL is also used to define internal and
external schemas (views).

Ex :

CREATE TABLE members (

PAGE 7
first_name CHAR(50) PRIMARY KEY,
last_name CHAR(75) NOT NULL,
dateofbirth DATE NULL
);
 In some DBMSs, separate storage definition language (SDL) and View Definition Language
(VDL) are used to define internal and external schemas.
 DBMS provide set of operations or a language called Data Manipulation language (DML).
These operations include such as retrieval, insertion, deletion, and modification of data.

SELECT * FROM members WHERE age>21;


 SQL is the relational database language. It contains DDL, VDL, and DML.

2.3 Different Types Of databases

 Hierarchical database
 Network database
 Relational database
 Object Relational database

In this project we have used relational database which simplifies certain


characteristics that make a relation different from a file or a table. Relational databases have
become a predominant choice for the storage of information in new databases used for
financial records, manufacturing and logistical information, personnel data and much more.
Relational databases have often replaced legacy Hierarchical Databases and Network

Databases because they are easier to understand and use, even though they are much less
efficient.

As computer power has increased, the inefficiencies of relational databases, which made them
impractical in earlier times, have been outweighed by their ease of use. However, relational
databases have been challenged by Object Databases, which were introduced in an attempt to
address the object-relational impedance mismatch in relational database, and XML databases.

The three leading commercial relational database vendors are Oracle, Microsoft, and IBM. The
three leading open source implementations are MySQL, PostgreSQL, and SQLite.

PAGE 8
2.4 Relational Database Management system

A relational database management system (RDBMS) is a database management system


(DBMS) that is based on the relational model as introduced by E. F. Codd. Most popular
commercial and open source databases currently in use are based on the relational model.

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. E. F. Codd introduced
the term in his seminal paper "A Relational Model of Data for Large Shared Data Banks",
published in 1970. In this paper and later papers he defined what he meant by relational. One
well-known definition of what constitutes a relational database system is Codd's 12 rules.
However, many of the early implementations of the relational model did not conform to all of
Codd's rules, so the term gradually came to describe a broader class of database systems. At a
minimum, these systems: presented the data to the user as relations (a presentation in tabular
form, i.e. as a collection of tables with each table consisting of a set of rows and columns, can
satisfy this property) provided relational operators to manipulate the data in tabular form.

The most popular definition of an RDBMS is a product that presents a view of data as a
collection of rows and columns, even if it is not based strictly upon relational theory. By this
definition, RDBMS products typically implement some but not all of Codd's 12 rules.

A relational database aims to achieve normalization of data. Normalization helps to reduce


redundancy and update anomalies. For normalization of data there are some normal forms like
First normal form, Second normal form, Third normal form, Boyce-Codd normal form, Fourth
normal form, and Fifth normal form.

2.5 Terms in Relational Database

2.5.1 Schema: A Relational Schema Definition (RSD) language that uses metadata of the
relational database to generate an implementation-neutral or implementation-specific format

PAGE 9
that represents the precise database structure and data. The RSD language is a declarative
description language such that an RSD file can then be used offline in a disconnected
environment to reconstruct and use the database.
2.5.2 Tuples: A tuple in the relational model is formally defined as a finite function that maps
field names to values, rather than a sequence, so its components may appear in any order. Its
purpose is the same as in mathematics, that is, to indicate that an object consists of certain
components, but the components are identified by name instead of position, which often leads
to a more user-friendly and practical notation.
2.5.3 Entity: An entity may be a object with physical existence or it may be an object with
conceptual existences.
2.5.4 Attribute: Each entity has an attributes-the particular property describes it. Several type
of attribute occurs namely:
a. Composite versus Simple Attributes: Composite attributes can be divided into smaller
subparts, which represent more basic attributes with independent meaning. Attributes that
are not divisible are called simple or atomic attributes.
b. Single-Valued versus Multi-valued Attribute: Most attribute have single value for a particular
entity, such attributes are called single-valued. In some cases an attribute can have a set of
values for the same entity such attributes called multi-valued.

Department of CSE,BE,UVCE

PAGE 10
2.6.1 ER DIAGRAM FOR ONLINE VOTING SYSTEM

PAGE 11
2.7 Components of RDBMS

2.7.1 Interface drivers: - A user or application program initiates either schema modification or
content modification. These drivers are built on top of SQL. They provide methods to prepare
statements execute statements, fetch results, etc. Examples include DDL, DCL, DML, ODBC,
and JDBC. Some vendors provide language-specific proprietary interfaces. For example
MySQL provides drivers for PHP, Python, etc.

2.7.2 SQL engine: - This component interprets and executes the SQL query. It comprises three major
components (compiler, optimizer, and execution engine).

2.7.3 Transaction engine: - Transactions are sequences of operations that read or write database
elements, which are grouped together.

2.7.4 Relational engine: - Relational objects such as Table, Index, and Referential integrity
constraints are implemented in this component.

2.7.5 Storage engine: - This component stores and retrieves data records. It also provides a
mechanism to store metadata and control information such as undo logs, redo logs, lock tables,
etc.

2.8 Primary Task of RDBMS Package

2.8.1 Database Development: used to define and organize the content, relationships, and structure
of the data needed to build a database.

PAGE 12
2.8.2 Database Interrogation: can access the data in a database for information retrieval and report
generation. End users can selectively retrieve and display information and produce printed
reports and documents.

2.8.3 Database Maintenance: used to add, delete, update, correct, and protect the data in a database.

2.8.4 Application Development: used to develop prototypes of data entry screens, queries, forms,
reports, tables, and labels for a prototyped application. Or use 4GL or 4th Generation Language
or application generator to develop program codes.

PAGE 13
2.9 Advantages of RDMS

2.9.1 Flexibility: Because programs and data are independent, programs do not have to be modified
when types of unrelated data are added to or deleted from the database, or when physical
storage changes. Fast response to information requests: Because data are integrated into a
single database, complex requests can be handled much more rapidly then if the data were
located in separate, non-integrated files. In many businesses, faster response means better
customer service. Multiple access: Database software allows data to be accessed in a variety
of ways (such as through various key fields) and often, by using several programming
languages (both 3GL and nonprocedural 4GL programs).

2.9.2 Lower user training costs: Users often find it easier to learn such systems and training costs
may be reduced. Also, the total time taken to process requests may be shorter, which would
increase user productivity. Theoretically, all occurrences of data items need be stored only
once, thereby eliminating the storage of redundant data. System developers and database
designers often use data normalization to minimize data redundancy.

Chapter 3

TOOLS USED

A Database Management system (DBMS) is a collection of program that enables user


to create and maintain a database; the DBMS is hence a general purpose software system that

PAGE 14
facilitates the process of defining, constructing, and manipulating database for various
applications. DBMS can also be defined as an orderly grouping of independent components
namely hardware, software and data linked together according to a plan to achieve an objective
of easier, quicker, inexpensive an flexible information handling.

3.1 ASP.NET

ASP.NET is a web based platform, which provides a programming model, a


comprehensive software infrastructure and various services requires to build up robust web
applications for PC as well as mobile devices.

ASP.NET works on top of the HTTP protocol, and uses the HTTP commands and policies to
set a browser-to-server bilateral communication and cooperation.

ASP.NET is a part of Microsoft .NET platform. ASP.NET applications are compiled codes,
written using the exte4nsible and reusable components or objects present in .NET framework.
These codes can use the entire hierarchy of classes in .NET framework.

ASP.NET is used to produce interactive, data-driven web applications over the internet. It
consists of a large number of controls such as text boxes, buttons and labels for assembling,
configuring, and manipulating code for HTML pages.

3.2 C #

C# is a modern, general-purpose, object-oriented programming language developed by


Microsoft and approved by European Computer Manufacturers Association (ECMA) and
International Standards Organization (ISO).

C# was developed by Anders Hejlsberg and his team during the development of .Net
Framework.

PAGE 15
C# is designed for Common Language Infrastructure (CLI), which consists of the
executable code and runtime environment that allows use of various high-level languages on
different computer platforms and architectures.

The following reasons make C# a widely used professional language −

 It is a modern, general-purpose programming language

 It is object oriented.

 It is component oriented.

 It is easy to learn.

 It is a structured language.

 It produces efficient programs.

 It can be compiled on a variety of computer platforms.

 It is a part of .Net Framework.

3.2 HTML

Majority of the documents that we have seen on the Web have been written using HTML.
Although it is not a full-featured as most modern word processors, it is well-suited for
producing documents that look good on any computer that can access the web, from an old
terminal to an expensive UNIX box.

 HTML stands for Hyper Text Markup Language


 An HTML file is a text file containing small markup tags
 The markup tags tell the Web browser how to display the page
 An HTML file must have an htm or html file extension
The first tag in your HTML document is <html>. This tag tells your browser that this is the
start of an HTML document. The last tag in your document is </html>. This tag tells your
browser that this is the end of the HTML document. The text between the <title> tags is the
title of your document. The title is displayed in your browser's caption.

The text between the <body> tags is the text that will be displayed in your browser. The text
between the <b> and </b> tags will be displayed in a bold font. When you save an HTML file,

PAGE 16
you should save with .html extension. There are several features in HTML that helps in
performing major operation for the database.

Some of the tags in HTML are:

 Paragraphs, Headings , Line Breaks:


o p, h1, h2, h3, h4, h5, h6, br
 Lists:
o OL, UL
 Formatting and Parse Elements:
o b, i . strong, ,u ,blockquote, font.
 Images:
o Img
 Tables:
o Table, tr, td
 Forms:
o form, input, option, select, textarea.

3.3 CSS

CSS is Cascading Style Sheets, is designed primarily to enable the separation of


document content (written in HTML or a similar markup language) from document
presentation, including elements such as the layout, colors, and fonts. This separation can
improve content accessibility, provide more flexibility and control in the specification of
presentation characteristics, enable multiple pages to share formatting, and reduce complexity
and repetition in the structural content.

3.4 SQL

SQL stands for Structured Query Language provides basic function for data
manipulation, transaction control, and record retrieval from the database. SQL is an
interactive and batch query tool that is installed with every Oracle Database Server or Client
installation.

PAGE 17
It has a command-line user interface, a Windows Graphical User Interface (GUI) and the
SQL web-based user interface.

SQL has its own commands and environment, and it provides access to the Oracle Database.
It enables you to enter and execute SQL commands to perform the following:

 Format, perform calculations on, store, and print from query results
 Examine table and object definitions
 Perform database administration

You can use SQL to generate reports interactively, to generate reports as batch processes, and
to output the results to text file, to screen, or to HTML file for browsing on the Internet. You
can generate reports dynamically using the HTML output facility of SQL, or using the dynamic
reporting capability of SQL to run a script from a web page.

SQL Plus is the front end tool for Oracle. The SQL Plus window looks much like a DOS
window with a white background similar to notepad. This tool allows you to type in your
statements, etc. and see the results. For instance, you can create tables, stored procedures, etc.
as well as issue a SQL Select statement here and have the results presented in this same window
as well.

3.5 IIS

The Internet Information Services (IIS, formerly Internet Information Server) is an


extensible web server created by Microsoft for use with Windows NT family. IIS supports
HTTP, HTTPS. FTP, FTPS, SMTP and NNTP.

IIS 6.0 and higher support the following authentication mechanisms:

 Anonymous authentication.
 Basic access authentication
 Digest access authentication
 Integrated windows authentication
 UNC authentication

PAGE 18
 .NET password authentication (Removed in Windows Server 2008 and IIS 7.0)

Chapter 4

IMPLEMENTATION

4.1 E-R MODEL

PAGE 19
An Entity – Relationship model (ER model for short) is an abstract way to describe
a database. It usually starts with a relational database, which stores data in tables. Some of the
data in these tables point to data in other tables - for instance, your entry in the database could
point to several entries for each of the phone numbers that are yours. The ER model would say
that you are an entity, and each phone number is an entity, and the relationship between you
and the phone numbers is 'has a phone number'. Diagrams created to design these entities and
relationships are called entity–relationship diagrams or ER diagrams.The building blocks
of an ER model are entities, relationships and attributes.

An entity may be defined as a thing which is recognized as being capable of an


independent existence and which can be uniquely identified. An entity is an abstraction from
the complexities of a domain. When we speak of an entity, we normally speak of some aspect
of the real world which can be distinguished from other aspects of the real world. A relationship
captures how entities are related to one another. Relationships can be thought of as verbs,
linking two or more nouns. Entities and relationships can both have attributes.

Entity–relationship diagrams don't show single entities or single instances of relations.


Rather, they show entity sets and relationship sets. a relationship set corresponds to a relation
in mathematics, while a relationship corresponds to a member of the relation.

Certain cardinality constraints on relationship sets may be indicated as well.

ER models assume information content that can readily be represented in a relational


database. They describe only a relational structure for this information.

Hence, they are inadequate for systems in which the information cannot readily be
represented in relational form, such as with semi-structured data.

4.2 SCHEMA

This depicts the relationship between logical record types in a hierarchical form. Doing this
will convert the network based representation into a linear model and enable a clear relation
between the entities.

PAGE 20
A database schema of a database system is its structure described in a formal
language supported by the database management system (DBMS) and refers to the
organization of data to create a blueprint of how a database will be constructed (divided into
database tables). The formal definition of database schema is a set of formulas (sentences)
called integrity constraints imposed on a database. These integrity constraints ensure
compatibility between parts of the schema. All constraints are expressible in the same language.
A database can be considered a structure in realization of the database language. The states of
a created conceptual schema are transformed into an explicit mapping, the database schema.
This describes how real world entities are modeled in the database.

"A database schema specifies, based on the database administrator's knowledge of possible
applications, the facts that can enter the database, or those of interest to the possible end-
users." The notion of a database schema plays the same role as the notion of theory in predicate
calculus. A model of this “theory” closely corresponds to a database, which can be seen at any
instant of time as a mathematical object. Thus a schema can contain formulas representing
integrity constraints specifically for an application and the constraints specifically for a type of
database, all expressed in the same database language.

Schemas are generally stored in a data dictionary. Although a schema is defined in text
database language, the term is often used to refer to a graphical depiction of the database
structure. In other words, schema is the structure of the database that defines the objects in the
database.

RELATIONAL MODEL MAPPING

Admin

Username Password
PAGE 21
Candidate

Cand_id Voter_id Name DOB Gender Email Mob_no Password Symbol

Elections

E-id Name Start End desc All Candidates

Voters

Voter_id Name DOB Gender Email Mob_no Password

Votes

E-id Voter_id Cand_id

4.3 TABLES IMPLEMENTED

PAGE 22
Table 1:ADMIN
NAME TYPE NULL KEY

USER NAME VARCHAR(30) NOT NULL PRI

PASSWORD VARCHAR(30) NOT NULL

Table 2:CANDIDATE
NAME TYPE NULL KEY

CAND_ID INT(11) NOT NULL PRI

VOTER_ID INT(11) NOT NULL

NAME VARCHAR(30) NOT NULL

DOB DATE NOT NULL

GENDER VARCHAR(1) NOT NULL

EMAIL VARCHAR(20) NOT NULL

MOB_NO VARCHAR(10) NOT NULL

PASSWORD VARCHAR(20) NOT NULL

SYMBOL VARCHAR(20) NOT NULL

PAGE 23
Table 3:VOTES
NAME TYPE NULL KEY

E-ID INT(10) UNSIGNED NOT NULL

VOTER_ID INT(10) UNSIGNED NOT NULL

CAND_ID INT(10) UNSIGNED NOT NULL

Table 4:ELECTIONS

NAME TYPE NULL KEY

E-id INT(10) UNSIGNED NOT NULL PRI

Name VARCHAR(15) NOT NULL

START DATETIME NOT NULL

END DATETIME NOT NULL

DESC VARCHAR(75) NOT NULL

ALL INT(10) UNSIGNED NOT NULL

CANDIDATES VARCHAR(128) NULL

PAGE 24
Table 5:VOTERS
NAME TYPE NULL KEY

VOTER_ID INT(11) NOT NULL PRI

NAME VARCHAR(30) NOT NULL

DOB DATE NOT NULL

GENDER VARCHAR(1) NOT NULL

EMAIL VARCHAR(20) NOT NULL

MOB_NO VARCHAR(10) NOT NULL

PASSWORD VARCHAR(20) NOT NULL

PAGE 25
4.4 SCREEN SHOTS

This is homepage where admin, voters and candidates are going to register and login. If
successful then they can get variety of options.

The Voter can register in this page.

PAGE 26
In this page the admin can add an election.

In above page the admin selects the candidates for the election.

PAGE 27
Chapter 5

TESTING

Software Testing is the process of executing a program or system with the intent of
finding errors. Software testing is any activity aimed at evaluating an attribute or capability of
a program or system and determining that it meets its required results. Although crucial to
software quality and widely deployed by programmers and testers, software testing still
remains an art, due to limited understanding of the principles of software.

Testing is usually performed for the following purposes:

5.1 To improve quality:

Quality means the conformance to the specified design requirement. Being correct, the
minimum requirement of quality, means performing as required under specified circumstances.
Debugging, a narrow view of software testing, is performed heavily to find out design defects
by the programmer. The imperfection of human nature makes it almost impossible to make a
moderately complex program correct the first time. Finding the problems and get them fixed is
the purpose of debugging in programming phase.

5.2 For Verification & Validation (V&V):

Another important purpose of testing is verification and validation (V&V). Testing can
serve as metrics. It is heavily used as a tool in the V&V process. Testers can make claims based
on interpretations of the testing results, which either the product works under certain situations,
or it does not work. We can also compare the quality among different products under the same
specification, based on results from the same test.

5.3 For reliability estimation:

Software reliability has important relations with many aspects of software, including
the structure, and the amount of testing it has been subjected to. Based on an operational
profile an estimate of the relative frequency of use of various inputs to the program testing
can serve as a statistical sampling method to gain failure data for reliability estimation.

PAGE 28
Database normalization is the process of organizing the fields and tables of a relational
database to minimize redundancy and dependency. Normalization usually involves dividing
large tables into smaller (and less redundant) tables and defining relationships between them.
The objective is to isolate data so that additions, deletions, and modifications of a field can be
made in just one table and then propagated through the rest of the database via the defined
relationships.

5.4 Normal Forms


5.4.1 First Normal Form (1NF): It states that the domain of an attribute must include only atomic
(simple, indivisible) values and that the value of any attribute in a tuple must be a single value
from the domain of the attribute. That means, composite and multi-valued attributes are not
allowed in a table.
5.4.2 Second Normal Form (2NF): It states that a relation schema R is in 2NF if ever non-prime
attribute A in R is fully functionally dependent on the primary key of R. In all the tables
mentioned above, the non-prime attributes are full functionally dependent on their primary
keys. There is no partial dependence on any other attribute. For example, in table Student, all
the non-prime attributes, Name, Address of a student are full functionally dependent on the
primary key ID.
5.4.3 Third Normal Form (3NF): It states that a relation schema R is in 3NF if it satisfies 2NF and no
non-prime attribute of R is transitively dependent on the primary key of R i.e., whenever a
nontrivial functional dependency X->A holds in R, either (a) X is a super-key of R, or (b) A is
a prime attribute of R. All the tables in the database satisfy the condition (a) i.e., in all nontrivial
functional dependencies, X is the super-key of R.
5.4.4 Boyce-Codd Normal Form (BCNF): It states that a relation schema R is in BCNF if whenever a
nontrivial functional dependency X->A holds in R, then X is the super key of R. The only
difference between 3NF and BCNF is that 3NF allows A to be a prime attribute, which is absent
in BCNF

PAGE 29
5.5 Testing Methods

Different types of testing are,

 Unit Testing
 Integrated Testing
 Black Box Testing

5.5.1 Unit Testing:

In this testing we test each module individually. Unit testing focuses verification efforts
on the smaller unit of the software design in the module. This is also known as ‘module’ testing.
The modules of the system are tested separately. The testing is carried out during programming
stage itself. In this testing step each module is found to working satisfactory as regard to the
expected output from the module. There are some validation checks for verifying the data input
given by the user which both the formal and validity of the entered. It is very easy to find error
debug the system.

Every module is executed individually and tested for any flaws. All pages are opened and
individually tested for any errors.

5.5.2 Integration Testing:

Once individual program components have been tested, they must be integrated to
create a partial or complete system. This integration process involves building the system and
testing the resultant system for problems that arises from component integrations. The main
difficulty that arises in integration testing is localizing errors that that are discovered during the
process. There are complex interactions between the system components and, when an
anomalous output is discovered, it may be hard to find the source of the error. To make it easier
to locate errors, we should always use an incremental approach to system integration and
testing.

Links between the pages are tested to be working correctly. The queries for the database are
tested from the pages and checked for working link between the jsp front end and the
database

PAGE 30
5.5.3 Black-Box Testing:

The black-box approach is a testing method in which test data are derived from the
specified functional requirements without regard to the final program structure. The tester treats
the software under test as a black box -- only the inputs, outputs and specification are visible,
and the functionality is determined by observing the outputs to corresponding inputs

Some of the Test Cases that were exercised were:

 Login using Incorrect Admin Name and Password.


 Invalid Entries in the input fields of Add
 Adding Duplicate Entries.
 Search for the deleted Entries.

The overall system was tested with all possible combinations of input and the system was found
to be reliable in all the cases. Some minor issues still exist, but is sufficient for us to get a good
overall picture of what actually happens in the real large scale database systems.

PAGE 31
CONCLUSION

The main purpose of creating this project was to provide users a user-friendly
ONLINE VOTING SYSTEM. The various items which are available can be easily viewed in
the website once the admin logs in. The admin can view elections and modify elections after
logging in. This user friendly GUI will help the administrators to be updated with latest
information.

I thank my teachers, friends and seniors who gave me valuable suggestion and guidance to
carry out this project. They have been a great source of technical support and inspiration
without this project would not have been completed. I would also like to thank all of them
who have been directly or indirectly responsible for helping me in completing this project
successful

BIBLIOGRAPHY

 http://www.w3schools.com/
 http://www.google.co.in/
 http://www.roseindia.net/
 http://stackoverflow.com/

PAGE 32

S-ar putea să vă placă și