[LRUG] Reasons for Postgres (was: Migrating SQLlite to MySQL)

Jocke Selin jocke at selincite.com
Tue Nov 17 01:05:14 PST 2009


On 17 Nov 2009, at 08:43, Riccardo Tacconi wrote:
> I would avoid to put much logic into the database, it is coming back to the database-centric design which is in contrast with DDD. I prefer to see the constraints all in my model.

Obviously this is a totally different religious war, but my view on this is simply where is your value of your application? If you ask that and your answer is that it's somewhere else than the data stored in the database, then by all means, use "data storage" rather than "relational databases".

In my current application everything is tied together. We have 35 tables. There's not a single table that is allowed to become out of sync. If they'd become out of sync serious financial implications would incur (such as VAT issues). This is not acceptable in our case. Therefore the DB is locked down as tightly as possible, and we would rather have a UI fail than a silent insert of faulty data.

That said, we try to build our models, controllers and views to prevent incorrect data being entered and edited. It is not only the DB that acts as a data-police.

In my experience there's very few situations when you need to saviour your DB agnostics; most of the time, when you're moving from one DB to another DB, you tend to change the structure and therefore you'll have to rewrite any DB specific stuff anyway.

:)

/Jocke


More information about the Chat mailing list