Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Well Designed RDBMS

by htoug (Deacon)
on Apr 08, 2003 at 10:54 UTC ( [id://248879]=note: print w/replies, xml ) Need Help??


in reply to Well Designed RDBMS

One of the things that annoys me about many common RDBMSs is that they do not support the concept of domain.
Dom... what?
Domain the set of possible values for a given data element (ie column) - remember that RDBMSs are all about set theory - relation are interscetionsbetween sets.
In your case the domain for the attribute values are all given as "whatever can be represented in 10 characters", which probably is not the case. Your attributes will have different domains (sets of possible values) - even though you would encode them all in a 10 character wide text column.
Handling domains with care, ie. taking care not to store different domains in the same column, not joining columns that have diffent domains and so on; ie. in general not comparing apples and oranges and not storing cats and apples in the same keg; simplifies the care and maintainance of your database - just like in all programming.
In your case I would look carefully at the data, consider what changes are likely, possible, unlikely, improbable and impossible - and try to make a clean database design based on those factors. Trying to optimize access to the data beforehand nearly always causes more trouble later - you know "measure first, tune later".
Try to get hold of a good textbook on vendor neutral database theory (ie not a manual for your RDBMS) and read on normalisation, optimisation and so on. Database design is a fine art, that can only be learned by correcting your own mistakes ;-)

Replies are listed 'Best First'.
Re: Re: Well Designed RDBMS
by nothingmuch (Priest) on Apr 08, 2003 at 11:07 UTC
    From a technical point of view, that's a Good Point&tm;.

    MySQL supports these, or if i understood right, part of what these can be in a pascal type record style. But you need to alter the table each time you need to add a new attribute type. bummer. You have a 16 bit limit on the number of constantly set values, and that's about it.

    From a conceptual point of view, it's a marvellous point, and a definate ++.

    I will keep in mind what you said, and finally get me a second book about programming. or something. damn, they cost a fortune. bah.

    Thanks for your time... =)

    -nuffin
    zz zZ Z Z #!perl
Re: Re: Well Designed RDBMS
by zby (Vicar) on Apr 08, 2003 at 11:17 UTC
    I don't see any difference in the way you talk about the domains and the general programming concept of type. You can have more fine grained types - it's just a kind of tradeoff.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://248879]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-26 02:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found