crossposted to: mailing.comp.open-office,comp.databases
follow up to: mailing.comp.open-office

This is in "base" for open office 2.0:

Three tables, A,B,C with an * to denote primary key fields:

A
one*    two     three
=====================
1       2       3
4       5       6
7       8       9

B
four*   five    six
===================
1       2       3
4       5       6
7       8       9

C
seven*  one     four
====================
1       1       1
2       1       4
3       1       7
4       4       1
5       4       4
6       4       7
7       7       1
8       7       4
9       7       7

Relations
=========

A.one   1:n     C.one           update/delete cascade
B.four  1:n     C.four          update/delete cascade

I want to make C.one and C.four a composite foreign key so that the
following never occurs:

C
seven*  one     four
====================
1       1       1
2       1       4
...
55     1       4

C.seven is unnecessary and fails to enforce uniqueness.  I asked this
also in the general list, before finding the archives for this list. 
I'm not finding a specific answer to this problem, although it seems
to depend somewhat on the database engine.  I installed via yum and am
using HSQLDB, which, presumably, supports composite foreign keys.

Do I need to use SQL commands directly?  If so, I'll have to install
something to do so?



thanks,

Thufir


(for search purposes: compound key, compound foreign key)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to