|
 |
Darren New wrote:
> The point of relational is to make
> the data unrelated to the actual code that uses it, but rather related
> to the real world stuff it represents.
One of the points of a relational database is that several programs can
use the data, possibly in ways not originally envisaged. If you make the
data related to the code that uses it... it's kind of hard to use it in
new, unexpected ways.
Today, lots and lots of people seem to forget this. They think of a
database as being a system for holding data that only one application
uses and only that application understands. This isn't what a database
is supposed to be. It's supposed to facilitate access by multiple programs.
> Ideally, for example, you'd have
> no "unique IDs" in your database - the only reason you do is that some
> real-world items have unique properties that you can't digitize.
Or sometimes it's just for performance. An order can be completely
identified by the customer it's for, the date it was placed, and what
was ordered. But that's a heck of a lot of information for a key. (In
fact, that *is* the entire order!) Having an artificial key [to use the
technical term] is much more convinient - especially if you want to
refer to the order from outside the database (e.g., over the phone).
Post a reply to this message
|
 |