| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Can I use an n:n relationship here?
Hi,
I have a table, tb_txn, which I use to hold transactions. These transactions may come from a file that is stored in a table, tb_file (tb_file is a parent record). the file may be broken down into sections which are stored in another table, tb_section (tb_section is the parent). The transactions may also come from an HTTP port, which has no table (no parent).
Simply put the relationships to a record in tb_txn are varied or nonexistant, and the client wants to add sources as they go.
The current system holds the "file_id" which is a foreign key to tb_file. To improve on this I may suggest that they create an intersect table which holds this key and the txn_id. In the case where tb_txn is related to a section I would create another intersect table to relate tb_txn to tb_section. If there is no saved source, as with the HTTP port there would be no relationship stored. If in the future there needs to be a new source I can always add a new intersect table to relate tb_txn.
My question: Does this violate any rules of database design? Particularly the fact that there may be cases where there is no relationship stored at all?
Thanks,
Sean
PS. I call them "intersect tables" some call them "resolver tables", "gerund tables", "linking tables" etc.. they are usually used to fix many to many relationships. Received on Wed Jul 17 2002 - 14:00:34 CDT
![]() |
![]() |