Aqua Phoenix

  2. Application

2.1.3 Database Frame

Information in the Database Window is used to connect eVote to its appropriate data source. The information entered in the 7 text-fields is written to a text file that is in turn used by eVote as a database configuration file. Details about each field:

  • JDBC Driver Class: Database access is made possible through JDBC and a database driver that is specifically made for JDBC and the database used. Every database has a different driver, i.e. Sybase uses a different driver from Oracle, which in turn uses a different driver from MySQL. The default driver included in eVote is a MySQL driver, which is packed in a jar file by the name of 'mm.mysql-2.0.4-bin.jar'. This file resides in the '/lib' directory under TOMCAT.
    Note: If you would like to use a database different from MySQL, or even use a different MySQL driver, make sure that you copy its jar file into Tomcat's '/lib' directory, or, if you don't intend to use Tomcat, make sure that it is accessible by eVote through the CLASSPATH.
    Example: (for MySQL and mm.mysql-2.0.4-bin.jar)

Fields labeled <1> through <6> are used to form the Database Connection URL as follows: jdbc:<1>://<2>:<3>/<4>?user=<5>&password=<6>

  • <1> JDBC Driver URL: Please find out from your driver's documentation.
    Example: (for MySQL and mm.mysql-2.0.4-bin.jar) mysql
  • <2> DB Host IP: The IP address of the machine that hosts the database.
  • <3> DB Host Port: The Port on which the database listens for connections.
    Example: (for MySQL) 3306
  • <4> DB Name: Name of eVote's database.
    Example: evote
  • <5> DB Username: Name of user that has access to eVote's database.
    Example: evoteAdmin
  • <6> DB Password: Password of user that has access to eVote's database.
    Example: evotePass

Example for complete URL: jdbc:mysql://

In addition to data entry, the Database Frame provides features to test the database and finally to create eVote's default tables.

  • Update Status: Attempts to connect to the database using the specified information, then executes a query to list all table names in the database. Errors are reported in the Text Area at the bottom of the Database Frame
  • Create Default Tables:
    • Type of database: Depending on the type of database, different data types are used in the table definitions. Default tables can be created for data types used in MySQL, Oracle, and Sybase. All data types used are enumerated in parentheses. After selecting Create Default Tables, the output and possibly any errors are listed in the Text Area.
    • Create Default Tables: Runs through a list of queries that create table definitions, as well as populate the tables with default information as necessary. This includes setting up one user account for admin, password admin.

Creating default tables
Figure 2: Creating default tables
Click to enlarge
Database Table Layout
Figure 3: Database Table Layout
Click to enlarge

2.1.4 Web Frame: Web Connection

The Web Frame is primarily used to test the web connection to eVote.

  • EVote Base URL: Specifies the root URL of evote.
  • Update Status: Attempts to download the file index.jsp from the specified URL. The downloaded file is output to the Text Area, unless errors occur.