refential integrity to multiple tables ??
От | Nagib Abi Fadel |
---|---|
Тема | refential integrity to multiple tables ?? |
Дата | |
Msg-id | 20031008055325.874.qmail@web21412.mail.yahoo.com обсуждение исходный текст |
Ответы |
Re: refential integrity to multiple tables ??
Re: refential integrity to multiple tables ?? |
Список | pgsql-general |
HI,
let's say i have a tansaction table called TRANSACTION (transaction_id,amount,type,type_id)
Let's say a transaction can have multiple types: TYPE1, TYPE2 for example.
EACH type has his own definition and his own table.
Every transaction has a type that could be type1 or type2 that's why if the type is TYPE1 i want to make a referential integrity to the TYPE1_TABLE and if the type is TYPE2 i want to make a referential integrity to the TYPE2_TABLE.
IS IT POSSIBLE TO DO THAT???
I made a turn around to this problem by creating two tables:
- table TYPE1_TRANSACTION (type1_id,transaction_id)
- table TYPE2_TRANSACTION (type2_id,transaction_id)
But this does not seem so right for me ??
thx for any help
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
В списке pgsql-general по дате отправления: