While your DBA has an, um--er, *cough*, interesting point, I personally think you've already hit upon the main reasons for doing it correctly:

I don't think you even know if it would save any appreciable amount of time or if there's a problem that needs to be solved. Would it not be wiser to do it right first and then see if there's a problem? His idea is already causing more work, jacking up the expense, and risking data integrity before anyone enters a single record.

If it turns out the second join does cause a problem, there are other approaches that don't risk the data integrity as severely. For example, what if you loaded your category lookup into an array and then printed that value when printing the query results? A tiny performance hit, perhaps...but nowhere as risky as crippling your data integrity from square one.

In my experiences with other databases, I've found that "performance improvements" are applied far earlier than they should be. As an excuse, it frequently gets used to mask sloppy programming or false-laziness. (I've also found that very few people understand normalization and why it's important, but that's another rant.)

Yes, the *are* times to break Codd's Rules--but not many. And the typical reasons for doing so aren't appropriate. IMHO.

Remember the first rule of The Pragmatic Programmer:, "Don't Repeat Yourself."

--f


In reply to Re: Database Design Issues - OT by footpad
in thread Database Design Issues - OT by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.