- Feb 17, 2010
- 3,274
- 202
- 106
Hi guys,
I'm busy doing a database design for a project that I am working on. The specific area that I have been assigned to is the financial area.
I want a DB design that enforces one debit and one credit per transaction. So, part of the design that I have come up, with a transaction line having a two joins to Account. One DebitAccountId and one CreditAccountId.
Is there any problem with having two joins between two tables? In the past, I know entity framework has moaned when it cant work out which path to follow to delete an item. Ie, if you delete an Account, and the delete cascades, there are multiple paths that it could follow to delete the transaction line. But for whatever reason, entity framework seems fine with this design. I've done a unit test or two.
Does anyone have any advice on whether having two joins between two tables is a good or bad idea?
I'm busy doing a database design for a project that I am working on. The specific area that I have been assigned to is the financial area.
I want a DB design that enforces one debit and one credit per transaction. So, part of the design that I have come up, with a transaction line having a two joins to Account. One DebitAccountId and one CreditAccountId.
Is there any problem with having two joins between two tables? In the past, I know entity framework has moaned when it cant work out which path to follow to delete an item. Ie, if you delete an Account, and the delete cascades, there are multiple paths that it could follow to delete the transaction line. But for whatever reason, entity framework seems fine with this design. I've done a unit test or two.
Does anyone have any advice on whether having two joins between two tables is a good or bad idea?