You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Carlos Chávez <cc...@agssa.net> on 2003/12/26 22:14:06 UTC
How to handle this relationship ?
Hi to all,
I need to know if this is handle for OJB or how to be manage:
I have a table which has a field that will be used like foreign key of
several tables. This is the schema :
CREATE TABLE table1 (
IDT1 INT4,
...
PRIMARY KEY(IDT1)
)
CREATE TABLE table2 (
IDT2 INT4,
...
PRIMARY KEY(IDT2)
)
CREATE TABLE tabla3 (
IDT3 INT4,
ID_DOC INT4,
ID_TYPE_DOC INT4,
PRIMARY KEY (IDT3)
)
The field ID_DOC, have to be a foreing key for table1 and table2.
I use field ID_TYPE_DOC to know which table provides the value of the
foreign key.
the relationships between the tables are to be weak, to avoid
violations of referecial integrity.
any idea ?
Cheers,
--
Carlos Chávez
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org