Discussion:
[Middlegen-user] 1:1 realtionship question
hari babu
2003-01-24 07:34:02 UTC
Permalink
hai all,
I have two tables A and B

Table A contains columns : name, ID, Age
Table B contains columns : ID, Marks. This ID has a
Foreign Key relationship to ID in table A.

I want to define a 1:1 relationship.(one student with
a ID, can have only one mark in table B).

But when i define this realtion and try creating an
entry in the tbale A or Table B i was caught in a
circular dependency.

to create an entry in table A the syntax is create(int
ID, String name, BLocal).

To create B the Syntax is : create(int marks, ALocal)

This might be a Naive question. but help me solving it
or corect me if i am wrong.


Hari Babu







__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
Kristoffer Moe
2003-01-24 09:01:04 UTC
Permalink
Seems like this is a mandatory 1:1 relationship. Wouldn't it be a good idea
to merge the two tables? If, however, the cardinality on the A->B
relationship is meant to be a 0..1 and not 1..1, there should be a create
(...) without BLocal parameter.

Kristoffer
Post by hari babu
hai all,
I have two tables A and B
Table A contains columns : name, ID, Age
Table B contains columns : ID, Marks. This ID has a
Foreign Key relationship to ID in table A.
I want to define a 1:1 relationship.(one student with
a ID, can have only one mark in table B).
But when i define this realtion and try creating an
entry in the tbale A or Table B i was caught in a
circular dependency.
to create an entry in table A the syntax is create(int
ID, String name, BLocal).
To create B the Syntax is : create(int marks, ALocal)
This might be a Naive question. but help me solving it
or corect me if i am wrong.
Hari Babu
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
-------------------------------------------------------
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
Post by hari babu
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Mvh/regards,


Kristoffer Moe
Senior Consultant
Elan It ReSource

Loading...