Re: Generating tables with relationships in arc and part of primary key, bug?
Date: 1996/06/16
Message-ID: <4q19pj$hji_at_hasle.sn.no>#1/1
reidlai_at_hk.super.net (Reid Lai) wrote:
>meldahl_at_pvv.unit.no (Ole Christian Meldahl) wrote:
>>I have three entites A, B and C. A relates to B and C with an arc and
>>(B,C)one-to-many(A). Both relationships are part of the UID of A.
[...]
>>My actual problem relates to generation of tables from the entities.
[...]
>>My conclusion is that the Generator/Wizard does not realize the
>>problem with arcs and primary keys.
>>If so, it's a bug! (IMHO, of course) The Wizard should have generated
>>an unique key instead.
>I think this is not a bug. In relational DBMS, referenced entities in
>a relationship must reference to the primary key of their referencing
>entities. For primary key definition, all composite key must be
>wholly null or wholly not null. Of course, the wholly null key means
>the key is non-exist.
Thanks for your help, but I think my problem-desription was a little confusing. Let me try with an example. And, btw, I meant that the bug was during generation of the tables, not necessariliy in the DBMS.
Lets say that table C are letters, table B are memos and table A are lines of text applying to both C and B. I need a definition such that I can store information like this:
Table C
Letter_1
Letter_2
Table B
Memo_1
Memo_2
Table A
lineno: 1 Letter_1 lineno: 2 Letter_1 lineno: 3 Letter_1 lineno: 4 Letter_1 lineno: 1 Letter_2 lineno: 2 Letter_2 lineno: 1 Memo_1 lineno: 1 Memo_2 lineno: 2 Memo_2 lineno: 3 Memo_2
It is easy to model this with arcs, but the implementation...... (of course, the keys of B and C are different)
Hope this clarifies my problem!
Thanks again.
oli
-- Ole Christian Meldahl "Sailor" Norwegian High Command, Information Systems meldahl_at_pvv.unit.noReceived on Sun Jun 16 1996 - 00:00:00 CEST