Friday, March 18, 2005

What's in the Database? (draft)

This is the initial draft. I will flesh it out and spruik it up over time.
Meantime, feel free to cast your opinions.
What tables should be present? How should they be organised?

Table: Voters
For starters, there should be a table for storing voter related information that is provided on registration. This should include stuff like:
  • Voter ID*
  • Login Name*
  • Password
  • Address
  • Email
  • Public Encryption Key
Address isn't strictly necessary, but is usually required to allow for statutory declarations ('I live here and this is the only time I've voted today')

Now, the Voters table is a permanent feature, to be used in successive polls. Sectioned off in a separate database is information relating to a particular ballot:

Table: Ballot
This is where ballots are stored in a form accessible to everyone. Data required:
  • Ballot ID
  • Timestamp
  • IsCurrent
  • Ballot Details
  • Voter Signature
  • Electoral Signature
The signatures are important. They represent a 'hashed' form of the row data which can be accessed by means of the voter's (or electoral office's) public keys. Any attempt to modify the data will be detected by the consequent invalidation of the calculated hash value against the signature. (I will describe public key encryption in more detail as required.)

Table: VoterBallot
This is where ballots are stored in a form accessible to the voter. Data required:
  • Voter ID
  • Ballot ID (encrypted by voter)
Which is to say: the voter can use this table to subsequently access and validate their ballot details, but no one else can.