thequbit / monroecountyvotes

Tool for quickly getting information about those people on your Ballot in Monroe County, NY
GNU General Public License v3.0
3 stars 0 forks source link

Design Database of Data #5

Open thequbit opened 8 years ago

thequbit commented 8 years ago

We need to have a simple database that will hold information about candidates so we can show information about the ballot.

Something like this ... ( up for debate )

class Ballots():
    __tablename__ = 'ballots'
    url
    sheet_number

class Offices():
    __tablename__ = 'offices'
    name
    classification # federal, state, local

class Parties():
    __tablename__ = 'parties'
    name

class Candidates():
    __tablename__ = 'candidates'
    name
    office_id

class CandidatePartyAssociations():
    __tablename__ = 'candidate_party_associations'
    party_id
    candidate_id

class CandidateBallotAssociations():
    __tablename__ = 'candidate_ballot_associations'
    candidate_id
    ballot_id

class OfficeBallotAssociations():
    __tablename__ = 'office_ballot_associations'
    office_id
    ballot_id

class