JORGE MALDONADO wrote
> Thanks for your answer. I am a DB novice and I still have questions, I
> would like you to explain a bit more about the following:
>
> " I'd generally question a design that uses 5 foreign keys on a matching
> table"
>
> Does this mean that my table with 5 foreign keys should have fewer foreign
> keys? How could I achieve this goal if such a table depends on 5 other
> tables? Maybe a must take into account a redesign of this precise table.
My point is a single table relating five other individual tables is quite
probably not properly normalized. If you are using multi-column primary
keys then the presence of 5 columns might only represent 2 source tables
which would be more 'normal'.
This kind of table typically is used for a direct many-to-many relationship
so having 5 foreign keys would definitely complicate the logic.
David J.
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Advice-on-index-and-constraint-definition-tp5819799p5819815.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.