Subject | Re: [firebird-support] very basic questions about FK |
---|---|
Author | Mark Rotteveel |
Post date | 2009-10-14T14:57:37Z |
Sergio H. Gonzalez wrote:
datum, so does not duplicate other data. A further example is that in
specific cases a sales person could make a special price (+ additional
comment in the description) for a specific customer which is only
recorded in the invoice etc.
So yes a casual glance could indicate that information is duplicated and
therefor not fully normalized, but in fact it is not.
You can of course argue that default prices and default descriptions
could be modeled out with a start- and end-date that should be used if
the 'override_price' or 'override_description' in the invoice-line is
NULL. But I think that the added complexity of such a solution is
generally unwanted (and maybe even prohibited by specific laws regarding
invoices, accounting and taxes).
Mark
--
Mark Rotteveel
>>> (*)I know that this is NOT very good, but I also copy the description ofNo, at the moment of sale the invoice record(s) becomes a separate
>>> the article in the invoice detail table... the problem is that the
>>> description of an item may change and I don't want the invoice to change
>>> any of the descriptions)
>
>> Why wouldn't that be good? As far as I know, that's the normal way to do
>> this.
>
> Database normalization??
>
> Though I've read that sometimes it's OK to break some of these rules... that's
> why I do it that way...
>
> Again: thanks for the inputs!!! really apreciated!!
datum, so does not duplicate other data. A further example is that in
specific cases a sales person could make a special price (+ additional
comment in the description) for a specific customer which is only
recorded in the invoice etc.
So yes a casual glance could indicate that information is duplicated and
therefor not fully normalized, but in fact it is not.
You can of course argue that default prices and default descriptions
could be modeled out with a start- and end-date that should be used if
the 'override_price' or 'override_description' in the invoice-line is
NULL. But I think that the added complexity of such a solution is
generally unwanted (and maybe even prohibited by specific laws regarding
invoices, accounting and taxes).
Mark
--
Mark Rotteveel