Professional Documents
Culture Documents
Bachelor of Engineering
In
By
Saurabh Sontakke- TE238
Mathura Rajurkar-TE253
Department of ENTC
College of Engineering
2021-2022
i
CERTIFICATE
This is to certify that the mini project report entitled “Online voting system” being submitted
by Saurabh Sontakke, Viraj ravenkar , Mathura rajurkar is a record of Bonafide work
carried out by her under the supervision and guidance of Mr. Nikhil Dhavase in partial
fulfillment of the requirement for TE Entc 2019 course of Savitribai Phule Pune University,
Pune in the academic year 2020-2021.
Place: Pune
Nikhil Dhavase
Guide
This Mini Project report has been examined by us as per the Savitribai Phule Pune University,
Pune requirements at MMCOE, Pune on 18th feb 2020
ii
ACKNOWLEDGEMENT
We have taken a lot of effort into this project. However, completing this project would not
have been possible without the support and guidance of a lot of individuals. We would like to
extend our sincere thanks to all of them.
We are highly indebted to Mr. Nikhil Dhavase for their guidance and supervision. We would
like to thank him for providing the necessary information and resources for this project. We
would like to express our gratitude towards our parents & our friends for their kind co-
operation and encouragement which help us a lot in completing this project.
Our thanks and appreciations also go to our classmates in developing the project. Thank you
to all the people who have willingly helped us out with their abilities.
Thanking you.
iii
ABSTRACT
In this project we created a application which is easy to access and user friendly. For this
application we used the backend as MySQL to store the data which is used in the application
and for the user interface, we can use PHP and HTML but here we have created a database
only.
In order for the representative to appropriately represent and implement the demands of the
people, the elections in which they are elected must be held fairly and results computed
accurately.
Achieving this objective is difficult using a manual system as the information is scattered,
can be redundant and collecting relevant information may be very time consuming. All these
problems are solved using this project.
iv
INDEX
1. Introduction 6
1.2 Motivation 7
1.3 Objective 7
2. Data type 8
3.2 ER Diagram 11
Conclusion 30
References 31
v
CHAPTER 1
INTRODUCTION
Online voting system is a voting technique. It protects the integrity of vote by preventing
voters from being able to vote multiple times. As a digital platform, they eliminate the need
to gather in-person, cast votes using paper, or by any other means (e.g., email, insecure
survey software).
In this system the voter do not have to go to the polling booth to cast their vote. They can use
their personal computer to cast their votes. There is a database which is maintained in which
all the name of the voters with their complete information is stored. The System
Administrator registers the voters by simply filling a registration form to register the voters.
After registration, the voter is assigned a secret voter ID with which he/she can use to login to
the system and cast his/her vote. If invalid/wrong details are submitted, then the person is not
registered to vote.
The advantage of online voting is that the voters have the choice of voting at their own free
time and there is reduced congestion. It also minimizes on errors of vote counting.
To develop a database using MySQL which contains the data of candidate like Name,
candidate Id, etc. This system is capable of displaying the results of a particular student.
1.2 Motivation
DBMS provides a fair advantage over file systems in case of data redundancy, inconsistency,
data sharing, data concurrency, data searching, data integrity and system crashing. Therefore,
DBMS was chosen to create the online voting system so that it can be easily accessible.
1.3 Objectives
To Develop a system that will manage:
1. Information about various candidates.
2. Information of various voters.
3. Information regarding the position
vi
CHAPTER 2
DATA TYPES
1. Integer: one optional sign character (+ or -) followed by at least one digit (0-9).
Leading and trailing blanks are ignored. No other character is allowed.
2. Varchar: it is used to store alpha numeric characters. In this data type we can set the
maximum number of characters upto 8000 ranges by the default SQL server will set
the size to 50 characters range.
3. Date: the DATE data type accepts date values. No parameters are required when
declaring a DATE data type. Date values should be supported in the form YYYY-
MM-DD. However, point base will also accept single digit entries for month and day
values.
4. Time: the TIME data type accepts time values. No parameters are required while
declaring a TIME data type.
5. Binary: it has a maximum length of 8000 bytes. It contains fixed length binary data.
6. Float: It is used to specify a floating-point value.
7. Real: it specifies a single precision floating point number.
8. Bit: It has the number of bits to store.
9. Decimal: It specifies a numeric value that can have a decimal number.
10. Numeric: it is used to specify a numeric value.
vii
CHAPTER 3
Data Modeling using ER Model
We list the data requirements for the database project here, and then create its conceptual
schema step-by-step as we introduce the modeling concepts of the ER model. The online voting
system database keeps track of candidates information such as id, first name, last name,
position_id etc Suppose that after the requirements collection and analysis phase, the database
designers provide the following description of the mini world—the details of that candidate
will be represented in the database. The voting database is organized according to the attributes
of candidate
1. Id
2. Username
3. password
4. Firstname
5. Lastname
6. Photo
7. Created_on
•Voters: Attributes of voter list are:
1. id
2. firstname
3. lastname
4. Password
5. Photo
6. Voters_id
viii
• Votes: Attributes of vote:
1. Id
2. Position_id
3. Candidate_id
4. Voter_id
• position: Attributes of position are:
1. Id
2. Voters_id
3. Candidate_id
4. Description
ix
Fig-3.1 ER diagram for online voting
x
Step 1: Mapping of Regular Entity Types:
For mapping the the regular entity types, we need to create a relation which will link the entity
and its simple attributes. The relations HAS is created to correspond to the regular entity types
which are voters, votes and position The foreign key and relationship attributes, are not
included yet; they will be added during subsequent steps. We have chosen voters_id,
candidate_id ,position_id as primary keys for the tables voters, votes, position respectively.
There are no weak entities here as all the entities included in the database are strong entities
and can be identified uniquely.
In this database,we have identified two 1:1 relationship namely voters HAS voters_id and
position HAS position_id.
In this database, we have identified one 1:N relationship namely candidate HAS position,
voters and votes, each of which having common ID.
xi
CHAPTER 4
);
INSERT INTO `admin` (`id`, `username`, `password`, `firstname`, `lastname`, `photo`,
`created_on`) VALUES
(1, 'Nandita', '123@', 'Nandita', 'Sharma', 'profile-image.jpeg', '28-05-2021');
xii
`platform` text NOT NULL
);
xiii
`lastname` varchar(30) NOT NULL,
`photo` varchar(150) NOT NULL
);
xiv
CHAPTER 5
TEST QUERIES
1. Display voter_id , firstname, lastname using inner join with tables voters and votes
xv
3. Display distinct firstname from table candidates
xvi
5. display firstname from table candidates in alphabetically order.
xvii
7. Display max vote from max_vote from table position.
xviii
9. Display table candidates having platform online
xix
12. display table votes ordered based on voters_id.
xx
14. display table votes not having voters_id =2 and id = 4.
15. display table positons having max_vote between 100 and 123.
xxi
16. Display id and sum(max_vote) from table positions using appropriate clause.
xxii
18. Display table candidates in descending order of position_id.
19. Display row from table votes having first digit as 4 in candidate_id column.
xxiii
21. Display firstname , lastname, candidate_id ,position_id from table voters using joins.
xxiv
24. Convert firstname from table candidates into lowercase.
25. Display firstname , lastname, plateform from table candidates having null value.
26. Display firstname , lastname, plateform from table candidates having not null value.
xxv
CONCLUSION
A database for ONLINE VOTING SYSTEM was created using MySQL. Some information
was added in the database with the appropriate entities and attributes. Various operations
were performed on the database. 25 different queries were tested. All the 25 queries have
successfully displayed output as per the snapshots uploaded above this section. Hence Online
voting system was successfully created and tested using MySQL. This system can be used to
organize data in a systematic way and interpret data as per the user’s needs.
xxvi
REFERENCES
xxvii