Multipart application responsibility for database

61 views Asked by At

I have a project consisting of a webapplication, a database and a program running in the background which processes rows created by the webapp. Both the programs work with the database and store their needed info (with tables both applications use).

To make the situation a bit clearer lets say I have a database (used by my applications exclusive) containing three Tables A, B and C.

  • A is only used by my webapp.
  • C is only used by the other program.
  • B contains columns that only the webapp needs als well as columns that the other program uses and of course columns used by both.

You can think of the whole project this way:

  1. User places an order throu the webapp
  2. The webapp stores the order in the database
  3. The other program accesses the database and processes the order
  4. If errors occured during the processing these are stored in the database as well

That raises the following questions:

  • Which program should be responsible for managing the tables in the database?
  • Should every program manage its exclusively needed tables itself or should one manage all so that the database is managed from a central point?
  • Who should manage the tables that both applications need?
  • Or should I manage the database myself as the database structure shouldn't change that often anyway

Some info on the side: DBMS is 9.3, webapp is using and accessing the database throu (currently managing the database using evolutions), and the other program is written in scala and acesses the database using .

1

There are 1 answers

0
mgttlinger On BEST ANSWER

Since nobody is providing a better solution I decided to manage the DB by hand as the structure of the database shouldn't change after my application goes live.