Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Q: Historical primary key
Barry Johnson wrote:
>
> Roger Wernersson (roger.wernersson_at_adra.se) wrote:
>
> Based on requirements as stated, just as you suggest...except I
> might add the Customer_Valid_Date in your original draft to the
> Customer shown above if that is still required....and I might
Instead of valid_from, I think adding current address and phone number (any one based on its importance if more than one). This will help as you avoid join(s).
> rename Customer_H and Phone_H to something like Customer_Address
> and Customer_Phone respectively. And maybe remove ph# from the
> primary key if I only wish to have one effective at a time? Or
> remove the first table and make Phone point to Address if you
> don't wish to know of someone without an address...etc., etc.
>
> Note that Valid_From repeated in each of these is *not* a
> normalization violation because, despite having the same name,
> they are *not* the same thing:
>
> Address.Valid_From: date on which the associated *address*
> takes effect.
> Phone.Valid_From: date on which the associated *ph#* takes
> effect.
>
> A question with which I have wrestled for years: whether to
> unambiguously name such fields (i.e., Address_Valid_From,
> Phone_Valid_From) or assume a column definition must always be
> contextual (i.e., Address.Valid_From, Phone.Valid_From).
I go with contextual names for relational database. Received on Fri Jan 31 1997 - 00:00:00 CST