in reply to OT: benefits of database normalization

Design 1 is NOT normalized, I agree. The biggest practical problem with non-normalized databases is that Add/Delete/Update become complicated. Here's an example of the problem with design 1: lots of facts and aliases already loaded. when you delete a fact, you have to scan the whole table to delete all matching aliases. same problem when you update the key column of a fact. Also, you can add a alias that doesn't point to a valid fact. So all this logic gets put into the code of the application, instead of having a normalized database that enforces these relationships. Most such happy coders get the code 99% right, and one day the %1 sneaks in, and someone has to clean up the mess and build it right (normalized) as it should have been. There are cases when de-normalization is used, in strict control, and only for specific reasons....Perhaps "they" should be giving you reasons WHY to use a de-normalized model; instead of you justifying normalization. BTW you can easily port a system between different languages and databases when the db is normalized...an application centric (non-normalized db) system is not easily ported.
  • Comment on Re: OT: benefits of database normalization

Replies are listed 'Best First'.
Re^2: OT: benefits of database normalization
by keath (Initiate) on Oct 03, 2004 at 13:49 UTC
    I would say the same thing as well.

    The problem with the non-normalized design of Model 1 is that the meaning of the data depends on your one application. Any other application that ever needs to access the database would have to recreate the routines in your application to derive meaning from the stored values.

    That goes for not just SELECT statement, but what happens in the first model when a dictionary word is deleted? You are likely to have a lot of orphaned aliases. You would have to manually delete all related entries, or ensure that id number was never used again, even though it would now be free and unique. Not just your app, but for every other application that needed to work with this information ever. It's likely data will be corrupted over time.

    When a database is properly modelled, the meaning, context, integrity, etc, is inherent in the data itself. It can be trusted to be right.