Your personal psuedo-code makes no sense. Please post DDL, so that
people do not have to guess what the keys, constraints, Declarative
Referential Integrity, datatypes, etc. in your schema are. Sample data
is also a good idea, along with clear specifications.
> Which relationship is better performance?
> If we have Note ------ PO and Note --------- SO
> or Note ----PO Note ----PO and Note ----- SO Note ----SO
It sounds like you want to know whether replacing each table with two
identical tables will give better performance. Taking into account the
ambiguity of "performance" and lack of other information, the answer is
no. (Stick with Note ------ PO and Note --------- SO).
John
Anil G - 25 Apr 2005 22:27 GMT
sorry about confusion, following is relationship:
Case-i
Note (*)-------(1) PO
Note (*)-------(1) SO
Case-ii
Note (1)-------(*)PO Note(*) -------(1)PO
Note (1)-------(*)SO Note(*) -------(1)SO
In Case-i, there will be one single table called NOTE with following
FKs:
PO_ID (Optional)
SO_ID (Optional)
But these relationships gets to much if you have 30 other objects needs
NOTE to be associated, that means 30 additional FKs
Where as Case-ii, ends up having multiple tables for each table object
requiring NOTE table association.
Thus, my question was which case is performance effective?
Arc Relationship would be Case-i
Let me know,
Thanks,
Anil G