47
Online Voting System 1. INTRODUCTION The proposed system consists of two modules, Administrator Module User Module USER (VOTER) MODULE User interface consists of a login name and unique password using which he/she can login into the Online Voting System. This will be supplied by the administrator to the user. Once the user has logged in, he has the privilege to view the names of the candidates listed by the administrator, view the results after the termination date of the election. The user module constitutes only one sub module: Authentication & Voting Each voter is provided with unique username and password manually by the administrator. The voter uses the username and password for login and exercise the fundamental right of voting. if incorrect username and password entered, the access to is denied to the user. And also voter is allowed to vote only once. This is 1

Documentation work online voting

Embed Size (px)

Citation preview

Page 1: Documentation work  online voting

Online Voting System

1. INTRODUCTION

The proposed system consists of two modules,

Administrator Module

User Module

USER (VOTER) MODULE

User interface consists of a login name and unique password using which he/she

can login into the Online Voting System. This will be supplied by the administrator to the

user. Once the user has logged in, he has the privilege to view the names of the

candidates listed by the administrator, view the results after the termination date of the

election. The user module constitutes only one sub module:

Authentication & Voting• Each voter is provided with unique username and password manually by the

administrator. The voter uses the username and password for login and exercise

the fundamental right of voting. if incorrect username and password entered, the

access to is denied to the user. And also voter is allowed to vote only once. This

is the security feature provided against external access of the system.

• After login the voter enters the voter home page ,which provides the links :

Candidate List This facilitates the voter to view the candidate names, the constituency name,

their symbol and their party name.

VoteThis provides the voter with a list of candidate with in his/her constituency

along with selection option (radio button) to select the preferred candidate from the list. If

the voting date is before termination date, the vote goes valid else goes invalid.

1

Page 2: Documentation work  online voting

Online Voting System

View Results

This provides graphical and user friendly representation of the votes

obtained by each candidate. It includes the percentage of the votes obtained by each

candidate. But the result can be viewed only after the termination date of the election.

Logout This provides an option for the voter to quit the session ,while in the voter

home page.

ADMINISTRATOR MOD Administrator interface consists of a login name and unique password using

which admin can login into the Online Voting System. Administrator has the main

control of the system. By logging into the page it can perform the following tasks.

Add Candidate

Here the admin can add the list of candidates in the election. It includes

candidates name, address.gender,party, party symbol etc. The candidates will be added to

the list only after completing the procedures.

Add Voter

Here the voters can be added to the database. The voters have also the privilege to

check the voters list from the homepage. The voters details includes name, address,

gender, age, constituency, image etc.

Add Election

Here the election to be conducted is selected. To add an election the constituency

should be selected and termination date of election should be specified.

2

Page 3: Documentation work  online voting

Online Voting System

Add Constituency

The constituency that is going to conduct election should be selected.

Voters List

Here we can view the voters list. Each constituency will be having separate voters list.

Candidate List

The list of candidates participating in the election can be seen. It includes the

candidates name, party name and party symbol.

The sub-modules of administrator are:

Voting Structure, Voters Registration

Candidate Registration

Counting & Categorization of Results

Voting StructureHere the eligible voters who are permitted to login to the system can utilize the

right to vote. Each voter can register a single vote to a candidate’s favour in his/her

constituency. The security measures taken within the system prevents them from

exercising their votes again i.e. the second vote by the same user goes invalid. The

starting and ending dates of the election are specified by the administrator. The user must

have an identity card and he must be in voters list.

Voters Registration

The registration procedure of all the eligible voters .This registration process is

done by the administrator. According to voters database each voter is provided with a

unique identification codes which includes username and password.

3

Page 4: Documentation work  online voting

Online Voting System

The details of the voters include username, password, name, address, gender,

constituency, image etc.With the voter registration, thus producing the voter list with the

given information of the voters. The voter list can be viewed by anyone accessing the

webpage. The admin can view the voter list with in his homepage.

Candidate Registration

The registration of the candidates in each constituency is done by the

administrator. The details of the candidate includes name, address, gender ,his/her

constituency, party and image. With the candidate registration, thus producing the

candidate list with the given information of the candidates. The candidate list can be

viewed by admin and the vote within their respective homepages. According to

candidates database (manual) each details of the candidates are stored in database

controlled by the admin including candidates details.

Counting & Categorization of Results

When the voter votes, the number of votes obtained by the selected candidate is

incremented by 1.The result is published only after the voting process is over. It is

accessible from the next day after the termination date. Here we depict the result in the

graphical representation according to the percentage of vote obtained by the candidate.

Result can be viewed by everyone who visits into the site without any authentication

problem. A link to view the result is kept in the index page and both admin and voter can

view the result in their respective homepages. When the user clicks the “RESULT” link,

before the termination date of theelection, “Result not Published yet” Message will be

displayed. The result comes with their party symbol on the top of the graph representing

the percentage of vote obtained by each candidate.

4

Page 5: Documentation work  online voting

Online Voting System

2. SYSTEM ANALYSIS

2.1 EXISTING SYSTEM

The Existing System is a manual Polling system. This would take time for

large amount of candidate to poll. So it would be updated as an image matching

system. The image comparison system matches the two images if two images are

same then the employee got marked as present. Some time the image matching not

exactly matched. Sometimes the pixels would be different. It compares the whole

image.

2.2 PROPOSED SYSTEM

Project is related to Online Voting System. The project maintains two levels of users:-

Administrator Level Voter Level

Main facilities available in this project are:-

Maintaining voter’s Identification.

Providing online voting management.

Providing updation of voter’s information.

Provide voter information to ELECTION COMMISION OF INDIA.

ELECTION COMMISION OF INDIA maintains the complete information of voter.

5

Page 6: Documentation work  online voting

Online Voting System

Voter can give his\her vote from any part of India.

3. SYSTEM SPECIFICATION

3.1 HARDWARE SPECIFICATION

The machine used to develop this system has the following hardware

Specification need

Processor : Pentium –IV

CPU Clock Speed : 3.1 GHz

Board Memory : 640 KB

Hard Disc Capacity : 10 GB

DVD Writer : 52 X

Display Type : VGA

Monitor : 15” Digital

Pointing Device : Mouse

Key Board : 104 keys

3.2 SOFTWARE SPECIFICATION

Operating system : Windows’2000 or XP

Language : ASP.NET

6

Page 7: Documentation work  online voting

Online Voting System

Back End : SQL SERVER

3.3 FEATURE OF THE SOFTWARE

Introduction to .net framework

NET (dot-net) is the name Microsoft gives to its general vision of the future of

computing, the view being of a world in which many applications run in a distributed

manner across the Internet. We can identify a number of different motivations driving

this vision.

Firstly, distributed computing is rather like object oriented programming, in that it

encourages specialized code to be collected in one place, rather than copied redundantly

in lots of places. There are thus potential efficiency gains to be made in moving to the

distributed model.

Secondly, by collecting specialized code in one place and opening up a generally

accessible interface to it, different types of machines (phones, handhelds, desktops, etc.)

can all be supported with the same code. Hence Microsoft's 'run-anywhere' aspiration.

Thirdly, by controlling real-time access to some of the distributed nodes

(especially those concerning authentication), companies like Microsoft can control more

easily the running of its applications. It moves applications further into the area of

'services provided' rather than 'objects owned'.

7

Page 8: Documentation work  online voting

Online Voting System

Interestingly, in taking on the .NET vision, Microsoft seems to have given up

some of its proprietary tendencies (whereby all the technology it touched was warped

towards its Windows operating system). Because it sees its future as providing software

services in distributed applications, the .NET framework has been written so that

applications on other platforms will be able to access these services. For example, .NET

has been built upon open standard technologies like XML and SOAP.

At the development end of the .NET vision is the .NET Framework. This contains

the Common Language Runtime, the .NET Framework Classes, and higher-level features

like ASP.NET (the next generation of Active Server Pages technologies) and WinForms

(for developing desktop applications).

The Common Language Runtime (CLR) manages the execution of code compiled

for the .NET platform. The CLR has two interesting features. Firstly, its specification has

been opened up so that it can be ported to non-Windows platforms. Secondly, any

number of different languages can be used to manipulate the .NET framework classes,

and the CLR will support them. This has led one commentator to claim that under .NET

the language one uses is a 'lifestyle choice'.

Not all of the supported languages fit entirely neatly into the .NET framework,

however (in some cases the fit has been somewhat Procrustean). But the one language

that is guaranteed to fit in perfectly is C#. This new language, a successor to C++, has

been released in conjunction with the .NET framework, and is likely to be the language

of choice for many developers working on .NET applications.

8

Page 9: Documentation work  online voting

Online Voting System

FRONT END OF SOFTWARE:

ASP.NET

ASP.NET is a programming framework built on the common language runtime that

can be used on a server to build powerful Web applications. ASP.NET offers several

important advantages over previous Web development models:

Enhanced Performance. ASP.NET is compiled common language runtime code

running on the server. Unlike its interpreted predecessors, ASP.NET can take

advantage of early binding, just-in-time compilation, native optimization, and

caching services right out of the box. This amounts to dramatically better

performance before you ever write a line of code.

World-Class Tool Support. The ASP.NET framework is complemented by a

rich toolbox and designer in the Visual Studio integrated development

environment. WYSIWYG editing, drag-and-drop server controls, and automatic

deployment are just a few of the features this powerful tool provides.

Power and Flexibility. Because ASP.NET is based on the common language

runtime, the power and flexibility of that entire platform is available to Web

application developers. The .NET Framework class library, Messaging, and

Data Access solutions are all seamlessly accessible from the Web. ASP.NET is

also language-independent, so you can choose the language that best applies to

your application or partition your application across many languages. Further,

common language runtime interoperability guarantees that your existing

9

Page 10: Documentation work  online voting

Online Voting System

investment in COM-based development is preserved when migrating to

ASP.NET.

Simplicity. ASP.NET makes it easy to perform common tasks, from simple

form submission and client authentication to deployment and site configuration.

For example, the ASP.NET page framework allows you to build user interfaces

that cleanly separate application logic from presentation code and to handle

events in a simple, Visual Basic - like forms processing model. Additionally,

the common language runtime simplifies development, with managed code

services such as automatic reference counting and garbage collection.

Manageability. ASP.NET employs a text-based, hierarchical configuration

system, which simplifies applying settings to your server environment and Web

applications. Because configuration information is stored as plain text, new

settings may be applied without the aid of local administration tools. This "zero

local administration" philosophy extends to deploying ASP.NET Framework

applications as well. An ASP.NET Framework application is deployed to a

server simply by copying the necessary files to the server. No server restart is

required, even to deploy or replace running compiled code.

Scalability and Availability. ASP.NET has been designed with scalability in

mind, with features specifically tailored to improve performance in clustered

and multiprocessor environments. Further, processes are closely monitored and

managed by the ASP.NET runtime, so that if one misbehaves (leaks,

deadlocks), a new process can be created in its place, which helps keep your

application constantly available to handle requests.

10

Page 11: Documentation work  online voting

Online Voting System

Customizability and Extensibility. ASP.NET delivers a well-factored

architecture that allows developers to "plug-in" their code at the appropriate

level. In fact, it is possible to extend or replace any subcomponent of the

ASP.NET runtime with your own custom-written component. Implementing

custom authentication or state services has never been easier.

Security. With built in Windows authentication and per-application

configuration, you can be assured that your applications are secure.

ASP .NET has better language support, a large set of new controls and XML

based components, and better user authentication.

ASP .NET provides increased performance by running compiled code.

ASP .NET code is not fully backward compatible with ASP.

New in ASP .NET

Better language support

Programmable controls

Event-driven programming

XML-based components

User authentication, with accounts and roles

Higher scalability

Increased performance - Compiled code

Easier configuration and deployment

Not fully ASP compatible

Language Support

ASP .NET uses the new ADO .NET.

11

Page 12: Documentation work  online voting

Online Voting System

ASP .NET supports full Visual Basic, not VBScript.

ASP .NET supports C# (C sharp) and C++.

ASP .NET supports JScript as before.

ASP .NET Controls

ASP .NET contains a large set of HTML controls. Almost all HTML elements on

a page can be defined as ASP .NET control objects that can be controlled by

scripts.

ASP .NET also contains a new set of object oriented input controls, like

programmable list boxes and validation controls.

A new data grid control supports sorting, data paging, and everything you expect

from a dataset control.

Event Aware Controls

All ASP .NET objects on a Web page can expose events that can be processed by

ASP .NET code.

Load, Click and Change events handled by code makes coding much simpler and

much better organized.

ASP .NET Components

ASP .NET components are heavily based on XML. Like the new AD Rotator, that

uses XML to store advertisement information and configuration.

User Authentication

12

Page 13: Documentation work  online voting

Online Voting System

ASP .NET supports forms-based user authentication, including cookie

management and automatic redirecting of unauthorized logins.

(You can still do your custom login page and custom user checking).

User Accounts and Roles

ASP.NET allows for user accounts and roles, to give each user (with a given role)

access to different server code and executables.

High Scalability

Much has been done with ASP .NET to provide greater scalability. Server to

server communication has been greatly enhanced, making it possible to scale an

application over several servers. One example of this is the ability to run XML parsers,

XSL transformations and even resource hungry session objects on other servers.

Compiled Code

The first request for an ASP .NET page on the server will compile the ASP .NET

code and keep a cached copy in memory. The result of this is greatly increased

performance.

Easy Configuration

Configuration of ASP .NET is done with plain text files.

13

Page 14: Documentation work  online voting

Online Voting System

Configuration files can be uploaded or changed while the application is running.

No need to restart the server. No more metabase or registry puzzle.

Easy Deployment

No more server restart to deploy or replace compiled code. ASP .NET simply

redirects all new requests to the new code.

Compatibility

ASP .NET is not fully compatible with earlier versions of ASP, so most of the old

ASP code will need some changes to run under ASP .NET.

To overcome this problem, ASP .NET uses a new file extension ".aspx". This will

make ASP .NET applications able to run side by side with standard ASP applications on

the same server.

HTML Server Controls

HTML elements in ASP.NET files are, by default, treated as text. To make these

elements programmable, add a runat="server" attribute to the HTML element. This

attribute indicates that the element should be treated as a server control.

Note: All HTML server controls must be within a <form> tag with the runat="server"

attribute!

Note: ASP.NET requires that all HTML elements must be properly closed

and properly nested.

14

Page 15: Documentation work  online voting

Online Voting System

HTML Server Control Description

HtmlAnchor Controls an <a> HTML element

HtmlButton Controls a <button> HTML element

HtmlForm Controls a <form> HTML element

HtmlGeneric Controls other HTML element not specified by a specific

HTML server control, like <body>, <div>, <span>, etc.

HtmlImage Controls an <image> HTML element

HtmlInputButton Controls <input type="button">, <input type="submit">, and

<input type="reset"> HTML elements

HtmlInputCheckBox Controls an <input type="checkbox"> HTML element

HtmlInputFile Controls an <input type="file"> HTML element

HtmlInputHidden Controls an <input type="hidden"> HTML element

HtmlInputImage Controls an <input type="image"> HTML element

HtmlInputRadioButton Controls an <input type="radio"> HTML element

HtmlInputText Controls <input type="text"> and <input type="password">

HTML elements

HtmlSelect Controls a <select> HTML element

HtmlTable Controls a <table> HTML element

HtmlTableCell Controls <td>and <th> HTML elements

HtmlTableRow Controls a <tr> HTML element

HtmlTextArea Controls a <textarea> HTML element

15

Page 16: Documentation work  online voting

Online Voting System

Web Server Controls

Like HTML server controls, Web server controls are also created

on the server and they require a runat="server" attribute to work.

However, Web server controls do not necessarily map to any existing

HTML elements and they may represent more complex elements. The

syntax for creating a Web server control is:

<asp:control_name id="some_id" runat="server" />

Web Server Control Description

AdRotator Displays a sequence of images

Button Displays a push button

Calendar Displays a calendar

CheckBox Displays a check box

CheckBoxList Creates a multi-selection check box group

DataGrid Displays fields of a data source in a grid

DataList Displays items from a data source by using templates

DropDownList Creates a drop-down list

HyperLink Creates a hyperlink

Image Displays an image

ImageButton Displays a clickable image

16

Page 17: Documentation work  online voting

Online Voting System

Label Displays static content which is programmable (lets you apply

styles to its content)

LinkButton Creates a hyperlink button

ListBox Creates a single- or multi-selection drop-down list

Literal Displays static content which is programmable (does not let

you apply styles to its content)

Panel Provides a container for other controls

PlaceHolder Reserves space for controls added by code

RadioButton Creates a radio button

RadioButtonList Creates a group of radio buttons

Repeater Displays a repeated list of items bound to the control

Table Creates a table

TableCell Creates a table cell

TableRow Creates a table row

TextBox Creates a text box

Xml Displays an XML file or the results of an XSL transform

Validation Server Controls

A Validation server control is used to validate the data of an input control. If the

data does not pass validation, it will display an error message to the user.

The syntax for creating a Validation server control is:

17

Page 18: Documentation work  online voting

Online Voting System

<asp:control_name id="some_id" runat="server" />

Validation Server Control Description

CompareValidator Compares the value of one input control to the value

of another input control or to a fixed value

CustomValidator Allows you to write a method to handle the

validation of the value entered

RangeValidator Checks that the user enters a value that falls between

two values

RegularExpressionValidator Ensures that the value of an input control matches a

specified pattern

RequiredFieldValidator Makes an input control a required field

ValidationSummary Displays a report of all validation errors occurred in a

Web page

ADO .NET

Most applications need data access at one point of time making it a crucial

component when working with applications. Data access is making the application

interact with a database, where all the data is stored. Different applications have different

requirements for database access. VB .NET uses ADO .NET (Active X Data Object) as

it's data access and manipulation protocol which also enables us to work with data on the

Internet. Let's take a look why ADO .NET came into picture replacing ADO.

18

Page 19: Documentation work  online voting

Online Voting System

Evolution of ADO.NET

The first data access model, DAO (data access model) was created for local

databases with the built-in Jet engine which had performance and functionality issues.

Next came RDO (Remote Data Object) and ADO (Active Data Object) which were

designed for Client Server architectures but soon ADO took over RDO. ADO was a good

architecture but as the language changes so is the technology. With ADO, all the data is

contained in a recordset object which had problems when implemented on the

network and penetrating firewalls. ADO was a connected data access, which means that

when a connection to the database is established the connection remains open until the

application is closed. Leaving the connection open for the lifetime of the

application raises concerns about database security and network traffic. Also, as

databases are becoming increasingly important and as they are serving more people, a

connected data access model makes us think about its productivity. For example, an

application with connected data access may do well when connected to two clients, the

same may do poorly when connected to 10 and might be unusable when connected to 100

or more. Also, open database connections use system resources to a maximum extent

making the system performance less effective.

ADO.NET

To cope up with some of the problems mentioned above, ADO .NET came into

existence. ADO .NET addresses the above mentioned problems by maintaining a

disconnected database access model which means, when an application interacts with the

database, the connection is opened to serve the request of the application and is closed as

19

Page 20: Documentation work  online voting

Online Voting System

soon as the request is completed. Likewise, if a database is updated, the connection is

opened long enough to complete the Update operation and is closed. By keeping

connections open for only a minimum period of time, ADO .NET conserves system

resources and provides maximum security for databases and also has less impact on

system performance. Also, ADO .NET when interacting with the database uses XML and

converts all the data into XML format for database related operations making them more

efficient.

The ADO.NET Data Architecture

Data Access in ADO.NET relies on two components: DataSet and Data Provider.

DataSet

The dataset is a disconnected, in-memory representation of data. It can be

considered as a local copy of the relevant portions of the database. The DataSet is

persisted in memory and the data in it can be manipulated and updated independent of the

database. When the use of this DataSet is finished, changes can be made back to the

central database for updating. The data in DataSet can be loaded from any valid data

source like Microsoft SQL server database, an Oracle database or from a Microsoft

Access database.

Data Provider

The Data Provider is responsible for providing and maintaining the connection to

the database. A DataProvider is a set of related components that work together to provide

20

Page 21: Documentation work  online voting

Online Voting System

data in an efficient and performance driven manner. The .NET Framework currently

comes with two DataProviders: the SQL Data Provider which is designed only to work

with Microsoft's SQL Server 7.0 or later and the OleDb DataProvider which allows us to

connect to other types of databases like Access and Oracle. Each DataProvider consists of

the following component classes:

The Connection object which provides a connection to the database

The Command object which is used to execute a command

The DataReader object which provides a forward-only, read only, connected recordset

The DataAdapter object which populates a disconnected DataSet with data and performs

update .

Data access with ADO.NET can be summarized as follows

A connection object establishes the connection for the application with the

database. The command object provides direct execution of the command to the database.

If the command returns more than a single value, the command object returns a

DataReader to provide the data. Alternatively, the DataAdapter can be used to fill the

Dataset object. The database can be Updated using the command object or the

DataAdapter.

21

Page 22: Documentation work  online voting

Online Voting System

Component classes that make up the Data Providers

The Connection Object

The Connection object creates the connection to the database. Microsoft Visual

Studio .NET provides two types of Connection classes: the SqlConnection object, which

is designed specifically to connect to Microsoft SQL Server 7.0 or later, and the

OleDbConnection object, which can provide connections to a wide range of database

22

Page 23: Documentation work  online voting

Online Voting System

types like Microsoft Access and Oracle. The Connection object contains all of the

information required to open a connection to the database.

The Command Object

The Command object is represented by two corresponding classes: SqlCommand

and OleDbCommand. Command objects are used to execute commands to a database

across a data connection. The Command objects can be used to execute stored procedures

on the database, SQL commands, or return complete tables directly. Command objects

provide three methods that are used to execute commands on the database:

ExecuteNonQuery: Executes commands that have no return values such as INSERT,

UPDATE or DELETE

ExecuteScalar: Returns a single value from a database query

ExecuteReader: Returns a result set by way of a DataReader object

The DataReader Object

The DataReader object provides a forward-only, read-only, connected stream

recordset from a database. Unlike other components of the Data Provider, DataReader

objects cannot be directly instantiated. Rather, the DataReader is returned as the result

of the Command object's ExecuteReader method. The SqlCommand.ExecuteReader

method returns a SqlDataReader object, and the OleDbCommand.ExecuteReader method

returns an OleDbDataReader object. The DataReader can provide rows of data directly to

application logic when you do not need to keep the data cached in memory. Because only

23

Page 24: Documentation work  online voting

Online Voting System

one row is in memory at a time, the DataReader provides the lowest overhead in terms of

system performance but requires the exclusive use of an open Connection object for the

lifetime of the DataReader.

The DataAdapter Object

The DataAdapter is the class at the core of ADO .NET's disconnected data access.

It is essentially the middleman facilitating all communication between the database and a

DataSet. The DataAdapter is used either to fill a DataTable or DataSet with data from the

database with it's Fill method. After the memory-resident data has been manipulated, the

DataAdapter can commit the changes to the database by calling the Update method.

The DataAdapter provides four properties that represent database commands:

SelectCommand

InsertCommand

DeleteCommand

UpdateCommand

When the Update method is called, changes in the DataSet are copied back to the

database and the appropriate InsertCommand, DeleteCommand, or UpdateCommand is

executed. 

24

Page 25: Documentation work  online voting

Online Voting System

BACK END OF SOFTWARE:

SQL Introduction:

SQL stands for Structured Query Language and is used to pull information from

databases.SQL offers many features making it a powerfully diverse language that also

offers a secure way to work with databases.

SQL (commonly expanded to Structured Query Language – is the most popular

computer language used to create, modify, retrieve and manipulate data from relational

database management systems. The language has evolved beyond its original purpose to

support object-relational database management systems. It is an ANSI/ISO standard.

SQL alone can input, modify, and drop data from databases. In this tutorial we

use command line examples to show you the basics of what we are able to accomplish.

With the use of web languages such as HTML and PHP, SQL becomes an even greater

tool for building dynamic web pages.

Database:

A database is nothing more than an empty shell, like a vacant warehouse. It offers

no real functionality what so ever, other than holding a name. Tables are the next tier of

our tree offering a wide scope of functionality. If you follow our warehouse example, a

SQL table would be the physical shelving inside our vacant warehouse. Each SQL table

is capable of housing 1024 columns (shelves). Depending on the situation, your goods

25

Page 26: Documentation work  online voting

Online Voting System

may require reorganization, reserving, or removal. SQL tables can be manipulated in this

same way or in any fashion the situation calls for.

SQL Server:

Microsoft's SQL Server is steadily on the rise in the commercial world gaining

popularity slowly. This platform has a GUI "Windows" type interface and is also rich

with functionality. A free trial version can be downloaded at the Microsoft web site,

however it is only available to Windows users.

SQL Queries:

Queries are the backbone of SQL. Query is a loose term that refers to a widely

available set of SQL commands called clauses. Each clause (command) performs some

sort of function against the database. For instance, the create clause creates tables and

databases and the select clause selects rows that have been inserted into your tables. We

will dive deeper in detail as this tutorial continues but for now let's take a look at some

query structure.

Views:

Views are nothing but saved SQL statements, and are sometimes referred as

“Virtual Tables”. Keep in mind that Views cannot store data (except for Indexed Views);

rather they only refer to data present in tables. Let’s checkout the basic syntax for

creating a view:

26

Page 27: Documentation work  online voting

Online Voting System

CREATE VIEW <View_Name>

AS           <SELECT Statement>        

GO

There are two important options that can be used when a view is created.

They are SCHEMABINDING and ENCRYPTION. We shall have a detailed look on

both of these, shortly, but first of all, let’s take a look of an example of a typical view

creation statement without any options.

SQL Server has an open architecture and so other system can interface with it

as well. At the core is the SQL Server engine, which supports transact. It is a well-known

and widely used data access tool. It is a powerful and unique superset of standard SQL.

In transact SQL a cost based query optimizer determines the likely best way

to access data. It maintains statistics about the volume and dispersion of data, which is

used to estimate the plan most likely to work for the operation requested. Transact-SQL

provides program constraints such as variables, conditional operations and looping. This

concept can improve performance in a client/server environment by estimating the need

the network conservations.

SQL server supports stored procedures for coding complex queries and

transactions. They can be invoked directly from the front-end applications. A unique

capability Microsoft SQL sever is extended stored procedure, which allows developers to

27

Page 28: Documentation work  online voting

Online Voting System

access resources outside SQL server like messaging integration and ability to write

HTML files. Extended Stored Procedures can be created as external dynamic link

libraries. SQL Server supports transactions processing which guarantee consistency and

recoverability of the database SQL supports server typical RDMS operations

DATABASE DESIGN

Table Name: Candidatereg

FIELD TYPE KEYPkicandidate id int(11) Primary

Fkilogin id int(11)Candidate name varchar(40)

Candidate address varchar(40)Cangender varchar(10)

Candidateofbirth DateCansymbol varchar(30)

Fkiconstituencyid int(11) ForeignPhone bigint(20)

Emailed varchar(15)Candesc varchar(30)Status Varchar(10)Party varchar(20)

Table Name: Constituency

FIELD TYPE KEYPksiconstituencyid int(11) Primary

Fkilocationid int(11) ForeignConstituencyname varchar(20)Candidatenumber int(11)

28

Page 29: Documentation work  online voting

Online Voting System

Voternumber int(11)

Table Name : Electiondetails

FIELD TYPE KEYPkielectiondetailsid Int(11) Primary

Fkivoterid int(11) ForeignFkielectionmasterid int(11) Foreign

Status varchar(20)

Table Name : Electionmaster

FIELD TYPE KEYPkielectionmasterid int(11) Primary

Electionname varchar(30)Fkiconstituencyid int(11) ForeignTerminationdate date

Table Name Location

FIELD TYPE KEYPkilocationid int(11) PrimaryLocationname varchar(40)

Voterno int(11)

Table Name Login

FIELD TYPE KEYPkiloginid int(11) PrimaryUsername varchar(20)Password varchar(20)

Role varchar(20)

29

Page 30: Documentation work  online voting

Online Voting System

Status varchar(20)

Table Name Result

FIELD TYPE KEYPkresultid int(11) Primary

Fkicandidateid int(11) ForeignCount int(11)

Termdate Date

Table Name Voterreg

FIELD TYPE KEYPkivoterid int(11) PrimaryFkiloginid int(11)Votername varchar(40)

Voteraddress varchar(40)Votergender varchar(10)Voterofbirth Date

Voterimg varchar(30)Fkiconstituencyid int(11) Foreign

Fkilocationid int(11) ForeignPhone Bigint(20)

Emailed varchar(30)Voterid int(11)Status varchar(10)Age int(11)

30

Page 31: Documentation work  online voting

Online Voting System

SYSTEM IMPLEMENTATION

The implementation process begins with preparing a plan for the

implementation system. According to this plan, the other activities are to be

carried out. In this plan, discussion has been made regarding the equipment,

resources and how to test the activities. Thus a clear plan is preparing for the

activities.

This Application is Tested and implemented successfully in the client spot.

The Input will be stored correctly in database and produce the expected output

whenever the user required.

31

Page 32: Documentation work  online voting

Online Voting System

FUTURE ENHANCEMENT

All the process is done through a singe domain. Incase user access

various domain this system does not response. In future this will be updated to

response the users while accessing various domains.

There will be a draw back in this system but this would be updated in

future that is the employee signature identification is stored in a database. Once

the employee poll for attendance he sends the image every time the employee

wants to poll. The stored image matches the sending image either match or not.

This system would be updated to add a hardware interface that is scanner. The

emloyee mark will be scanned every time and check the matching. No other user

will poll wrong attendance.

32