1

Topic: The partial update of reference manuals

Good afternoon. Prompt, please, as is better to organize the partial update of hierarchical reference manuals.
That is for example, there is a reference manual of the organizations.
CREATE TABLE ORGANISATIONS
(
ORG_ID NUMBER;
PARENT_ORG_ID NUMBER;
NAME NVARCHAR2
PERIOD_KEY NUMBER
);
Uniqueness PERIOD_KEY and ORG_ID.
When the data with new  structure comes, it is necessary to update only changed elements. It turns out that for new elements PERIOD_KEY changes, and for "parents" PERIOD_KEY remains without changes. How, it is possible to set FC c PARENT_ORG_ID on ORG_ID? That is it turns out that ORG_ID is not unique, and communication PARENT_ORG_ID, PERIOD_KEY and ORG_ID, PERIOD_KEY too is incorrect, since for "parents" PERIOD_KEY can not change. How, is better to organize the partial update of reference manuals?

2

Re: The partial update of reference manuals

Assignment PERIOD_KEY is not clear.
From what the vagueness, in what complexity foreign key PARENT_ORG_ID-> ORG_ID follows.

3

Re: The partial update of reference manuals

dmdmdm, it is the period of update of the data

4

Re: The partial update of reference manuals

* nippers for extraction *
Which is updated when...?

5

Re: The partial update of reference manuals

dmdmdm, there is a reference manual in it update dates are brought, at it is PK PERIOD_KEY. Accordingly, the data can not change, or can partially change, for new records accordingly PERIOD_KEY will be new, old it is possible to mark for example OUTDATE = an action expiry date. Here I want while to understand, how optimal to organize this partial update, that was supervised that PARENT_KEY it PRODUCT_KEY (but them can be a little (()

6

Re: The partial update of reference manuals

In my opinion, update should go on the key fields providing hierarchy.
That at you the key composite, does not change an essence, is a problem of your architecture. If in it the element can have different parents during the different moment of time - well, so solved, resolve such situations.

7

Re: The partial update of reference manuals

Differently it is possible to implement.
Look in Google examples search in "storage of the historical data".
In , for example, the history of address objects is stored also, as well as described in the given subject, it is possible to familiarize with implementation.