Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best Database for Computational Problem

Tags:

sql

database

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?

like image 509
Yehuda Katz Avatar asked Sep 11 '26 04:09

Yehuda Katz


2 Answers

This looks like pretty standard relational data to me. Any RDBMS (MySQL, SqlServer, postgres, etc.) will do.

Or are you asking advice on how to make tables to store this data?

like image 142
Seth Avatar answered Sep 12 '26 18:09

Seth


You could use just about any database, until I read:

...rank congressmen...

MySQL doesn't have any ranking functionality. I'm not clear on Postgres' ranking support, but Oracle and SQL Server have supported ranking for a while now (Oracle 9i+, SQL Server 2005+). And they both provide free versions.

like image 23
OMG Ponies Avatar answered Sep 12 '26 18:09

OMG Ponies