On Dienstag, 19. Dezember 2006 15:19 Matthew O'Connor wrote: > I may be missing something here, but usually if you want to have a > many-to-many relationship between two tables, you use a link table, > so between zmi_domains and zmi_customers you would have a third > table, something like: > zmi_cust_domains_lookup( > id serial primary key, > domain_idnr bigint references zmi_domains.domain_idnr, > client_idnr bigint references zmi_custdomains > )
zmi_custdomains is already between zmi_domains and zmi_customers What was missing was a trigger, as Paul already mentioned. > HOW can I make sure domaingrp_idnr can have only values that exist in > zmi_domains(domaingrp_idnr)? I can't find how I write a constraint > for that. I just didn't have time to look at it for now. mfg zmi -- // Michael Monnerie, Ing.BSc ----- http://it-management.at // Tel: 0676/846914666 .network.your.ideas. // PGP Key: "curl -s http://zmi.at/zmi3.asc | gpg --import" // Fingerprint: 44A3 C1EC B71E C71A B4C2 9AA6 C818 847C 55CB A4EE // Keyserver: www.keyserver.net Key-ID: 0x55CBA4EE
pgpRarAf8t241.pgp
Description: PGP signature
_______________________________________________ DBmail mailing list [email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail
