Re: Denormalization problem

From: Nelson Ricardo <nelson_at_nelsonricardo.com>
Date: 29 May 2003 14:03:26 -0700
Message-ID: <1c37187b.0305291303.4bd75074_at_posting.google.com>


Karel Miklav <karel_at_inetis.spppambait.com> wrote in message news:<FeoBa.463$78.9565_at_news.siol.net>...
> I have a multilingual database with this design pattern:
>
> car ( PK(id), wheels, engine_id )
> engine ( PK(id) , last_property)
> engine_description ( PK(engine_id, language_id), description )
>
> Objects have parts and parts have descriptions in different languages.
> Parts are generated in run time and descriptions in all languages are
> never known. When 'engine' loses it's 'last_property' I'm tempted to
> delete it, but thus I also lose referential integrity. What am I
> supposed to do; denormalize and throw away the integrity, tolerate that
> id-only tables or something completely different?
>
> Regards,
> Karel Miklav

Rather than deleting the engine, add a column to that table. It should be char(1) and named "inactive". Set the value to "Y" for those that are no longer active (i.e., in essence marking them as "deleted" without realling deleting); set the value to "N" for those that are active. This is how our accounting software handles deleted entries and inactive codes. Received on Thu May 29 2003 - 23:03:26 CEST

Original text of this message