Re: data model help, was Re: Using null date fields to indicate active/expired records

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Brian Ghidinelli <brian(at)pukkasoft(dot)com>, sfpug(at)postgresql(dot)org
Subject: Re: data model help, was Re: Using null date fields to indicate active/expired records
Date: 2004-08-11 16:19:01
Message-ID: 200408110919.01110.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: sfpug

Brian,

> Alrighty... attached is a small (32k) image generated from Erwin that
> shows the relevant parts of the model. The tables are not fleshed out
> to save space; they mostly show keys.

How about a SQL dump of just the tables we're dealing with? I can't speak
for others, but I'm not going to do a general data model critique.
Particularly since I'd have to take a machete to it, and I charge for that
;-)

> I use a psuedo-hungarian notation
> to indicate what the datatype is (uid = uuid, vch = varchar, dte = date,
> dtm = datetime, int/tnt/snt = int, boo = boolean).

Hungarian notation! Aiieeeeeeeeeeeeeeeeeee!
For the sanity of your successors, you may want to consider giving up HU in
database design. Actually, you should give up HU entirely; it's a relic of
the "bad early '90's" and visual basic "programming."

> A challenge I'm facing is balancing a very strict data model versus a
> more flexible data model that will allow the organizers to "bend the
> rules" a bit (e.g., whether or not to require tblMapAttendeeClasses to
> use classes available in tblMapEventClasses).

Flexible data models should be accomodated through your database and
application design, not created by omission. For example, if you want
organizers to be able to add new "classes" on the fly, then design for it;
don't just leave the constraint out.

Now, how does this relate to your question about using NULL dates?

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse sfpug by date

  From Date Subject
Next Message elein 2004-08-11 18:28:37 sys admin work?
Previous Message Josh Berkus 2004-08-10 22:48:40 Re: Using null date fields to indicate active/expired records