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 ;-)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.