On Dec 9, 2007, at 3:04 PM, Tom N. wrote:
it right? If you say a table collumn is “not null” you wont be
There are varying opinions about what role a database should play in
your application. On one end of the spectrum is the idea that a
database is nothing more than a place to store data and all
constraints and rules should be enforced in the application. At the
other end is the idea that the database should contain as much
business knowledge as possible, with the primary intent being the
protection of the integrity of the data, and with a secondary intent
of isolating the logic in one place. In the first case, each client
that accesses the data must implement the same rules, and any
variation (or gaps) jeopardizes the value of the data. In the
second, the rules are already in place, so new clients don’t have to
worry about it.
Representing these various positions are people who tend to be very
passionate about what they do and believe, so you will often find
extremely opinionated conversations. I definitely agree with the idea
that a database application is only as good as the data it
manipulates. And you can’t beat a database engine for enforcing
database rules. So I’m am a firm believer in indexing, constraints,
and stored procedures (where appropriate). I have, however, seen
databases get bogged down by developers trying to do things in them
that are better suited to application code. But that’s part of the
debate that I try very diligently to stay out of :).
But don’t just take my word (or anyone else’s) for it. Get some
experience and decide for yourself.
Peace,
Phillip