Voting System ER Diagram

Voting System ER Diagram

The capstone project entitled Voting System is an alternative or replacement to the manual voting process that uses pen and paper. The said system has two versions; (1) LAN based version that can only be accessed in the computer laboratory of the school, (2) the web and mobile version that can be accessed through a mobile device (cellphone and tablet).

  • LAN version is available in Visual Basic and MS Acces/MySQL
  • Web and Mobile version is available in PHP, MySQL and Bootstrap

This article will discuss the step by step process on how to prepare the entity relationship diagram or ERD of the project entitled Voting System.

The first step in the development of the Voting System is to prepare the ER diagram that will serve as the basis later on in the creation of the actual database.

We will create and explain the process of making the entity relationship diagram of Voting System.

Let’s start from the symbols used in the ER Diagram.

Entity is represented by the rectangle shape. The entity will be our database table of Voting System later on.

Attribute is represented by the oval shape. This will be the columns or fields of each table in the Voting System.

Relationship is represented by diamond shape. This will determine the relationships among entities. This is usually in a form of primary key to foreign key connection.

We will follow the 3 basic rules in creating the ER Diagram.

  1. Identify all the entities.
  2. Identify the relationship between entities and
  3. Add meaningful attributes to our entities.

Step 1. In the Voting System we have the following entities

  • Student
  • Course
  • Vote
  • Candidate
  • Candidate Position
  • Party

Our design of Voting System consists of 6 entities; the specified entities will be our database tables in the design and implementation of Voting database schema.

We will now draw the entities of the Voting System specified above and it will be represented by a rectangle shape. The image below is the entities identified in the scope of the Voting System.

Voting System ER Diagram - Step 1 Identify Entities
Voting System ER Diagram – Step 1 Identify Entities

Step 2. After we have specified our entities, it is time now to connect or establish a relationship among the entities.

Voting System ER Diagram - Step 2 Table Relationship
Voting System ER Diagram – Step 2 Table Relationship
  • The student belongs or enrolled in a course (1 to 1 relationship).
  • The student can only vote once, thus the relationship/cardinality is 1 is to 1 (1 to 1 relationship). You can also say 1 is to many if you refer to the number of candidates the student has selected but as to the number of votes the student can submit or cast is only one.
  • The student can only apply for a single position (1 to 1 relationship).
  • A candidate can only run for a single position (1 to 1 relationship).
  • A candidate belongs to 1 party (1 to 1 relationship). You can also say 1 is to many if you refer to the number of candidates that registers for a specific party but as to the number of party a candidate can apply then it is 1 is to 1.

Step 3. The last part of the ERD process is to add attributes to our entities.

Voting System ER Diagram - Step 3 Complete ERD
Voting System ER Diagram – Step 3 Complete ERD

Student Entity has the following attributes:

  • ID – primary key represented with underline
  • Student ID No
  • Last name
  • First name
  • Middle name
  • Course ID – foreign key
  • Voting code
  • Voting status
  • Image

Course Entity has the following attributes:

  • ID – primary key represented with underline
  • Initial
  • Name

Vote Entity has the following attributes:

  • ID – primary key represented with underline
  • Student ID – foreign key
  • Candidate ID
  • Date
  • Time

Candidate Entity has the following attributes:

  • ID – primary key represented with underline
  • Student ID – foreign key
  • Position ID – foreign key
  • Party ID – foreign key

Candidate Position Entity has the following attributes:

  • ID – primary key represented with underline
  • Name
  • Short name
  • Sort Order
  • Votes Allowed
  • Allow per Party

Party Entity has the following attributes:

  • ID – primary key represented with underline
  • Name
  • Description

Note: all attributes with underline represents the primary key of the entity or table.

The next step is to convert the plan designed on ER Diagram into the actual database, please search for the Voting System article which was already posted.

Contact us on our facebook page for the softcopy of the Voting System.

You may visit our facebook page for more information, inquiries and comments.

Hire our team to do the project.

,

Post navigation