I'm presently creating a tool that has the next tables and also the particular posts.

Budget             Category          Transactions
budget_id          category_id       transaction_id
category_id                          category_id

Presently we're mapping the records of Budget to Transactions using category_id. But there exists a glitch within the design. If two budget products have a similar category_id, the transactions get planned to both budget. How do i possess a design which maps the transactions products towards the budget products inside a face to face fashion but nonetheless keeping the loose coupling?

Budget             Category          Transactions
budget_id          category_id       transaction_id
category_id                          budget_id