2 ms·
> I end up doing all important checks on the objects, and none in the DB. Databases, particularly relational databases, have a LOT of functionality specificall
by silentbicycle 18y ago
> I end up doing all important checks on the objects, and none in the DB.
Databases, particularly relational databases, have a LOT of functionality specifically for enforcing constraints and consistency checks on data. You will almost certainly need to organize your schema differently, but you can delegate a lot of that checking onto the database engine, and it will probably speed everything up -- you'll be passing quite a bit less data back and forth just to verify it, and databases are generally optimized heavily for that sort of checking. (Databases are also great at dealing with data as collections, unsurprisingly.)
All bets are off if you're using a really crappy RDBMS, though. (Postgresql is quite good, in my experience.)