[thelist] Database schema

Ken Schaefer ken at adOpenStatic.com
Tue Dec 9 20:13:47 CST 2003


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Ed McCarroll" <Ed at ComSimplicity.com>
Subject: RE: [thelist] Database schema


: > Right now I've stored all the product specific fields
: > in the products table and prefixed them with the
: > name of the category they refer to. Is this a good
: > approach or should I put them in separate tables? The
: > table is getting pretty unmanageable already.
:
: It depends upon what you're doing with the data, but I'd
: be inclined to set up one table for each category. IMO,
: a good schema is one that accurately models the real
: world, and CPUs and hard drives aren't really the
: same kind of things.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I would argue that a good database schema reflects the entities, their
attributes and the relationships between them. If the entity is a "computer
component", and you are storing the same attributes for each component, then
there's nothing wrong with having both hard disks, and CPUs stored in a
"components" table.

What is absolutely fundamental is accurate ER/EER modelling of the
entities/relationships/attributes, plus a good idea of the types of things
that the system is expected to do. The database schema will pretty much fall
into place after that.

Cheers
Ken

Microsoft MVP - Windows Server (IIS)



More information about the thelist mailing list