Reasons for & against a Database

Posted by dbemerlin on Stack Overflow See other posts from Stack Overflow or by dbemerlin
Published on 2010-04-12T14:11:35Z Indexed on 2010/04/12 14:23 UTC
Read the original article Hit count: 351

Filed under:
|

Hi,
i had a discussion with a coworker about the architecture of a program i'm writing and i'd like some more opinions.

The Situation:

  • The Program should update at near-realtime (+/- 1 Minute).
  • It involves the movement of objects on a coordinate system.
  • There are some events that occur at regular intervals (i.e. creation of the objects).
  • Movements can change at any time through user input.

My solution was:

  • Build a server that runs continously and stores the data internally.
  • The server dumps a state-of-the-program at regular intervals to protect against powerfailures and/or crashes.

He argued that the program requires a Database and i should use cronjobs to update the data. I can store movement information by storing startpoint, endpoint and speed and update the position in the cronjob (and calculate collisions with other objects there) by calculating direction and speed.

His reasons:

  • Requires more CPU & Memory because it runs constantly.
  • Powerfailures/Crashes might destroy data.
  • Databases are faster.

My reasons against this are mostly:

  • Not very precise as events can only occur at full minutes (wouldn't be that bad though).
  • Requires (possibly costly) transformation of data on every run from relational data to objects.
  • RDBMS are a general solution for a specialized problem so a specialized solution should be more efficient.
  • Powerfailures (or other crashes) can leave the Data in an undefined state with only partially updated data unless (possibly costly) precautions (like transactions) are taken.

What are your opinions about that?
Which arguments can you add for any side?

© Stack Overflow or respective owner

Related posts about rdbms

Related posts about subjective