I'm trying to decide what database system to use for storing information that is relatively static but needs to be computed in a number of different (runtime specified) ways. The basic contours of the data are votes in the US Congress:
A bill:
- has many roll calls
- has a name, and other short metadata
- has text, and other potentially long metadata
- has a status (passed, failed, in progress)
A roll call:
- has a date
- has many votes
- has a status (passed, failed)
A vote:
- belongs to a member of Congress
- has a kind (aye, nay, present, not voting)
A member of congress:
- has a name (and other short metadata)
- has many periods
A period:
- has a start and end date
- has a political party (Democrat, Republican, other)
- has a position (member of Congress, committee chair, Speaker, etc.)
I would like to be able to easily build queries like:
- For X, Y, and Z roll call votes, tell me the "Democratic" position and the "Republican" position. Then, rank congressmen in the congress those votes were held by their fidelity to those positions.
- For X bill which failed, tell me the closest roll calls. Then, tell me which members of the majority party defected to produce those failures.
- For X bill passed, but which was opposed by the majority party, tell me which members of the majority defected to produce the passage.
I will have a finite number of query types like these, but the bills, roll call votes, political parties, etc. involved will be dynamically generated.
What is the best storage mechanism for the underlying data that will allow me to issue these queries dynamically and as performantly as possible?