I'm trying figure out the best way to deal with the following situations:
This scenario is oversimplified for the sake of the question. Let's say I have 3 tables: Transactions, Accounts and Designations.
Transactions table has an primary key called Trans_TransId and keeps track of all contact information associated with a transaction.
Accounts table contains a list of predefined accounts. It has a primary key called Acc_Code and a description column named Acc_Val
Designations table is a relations table which consists of a Trans_TransId, referencing a primary key from Transactions table, Acc_Code referencing a primary key from Accounts table, and Des_Amount which is an mount designated to a particular account for that transaction. This table allows for multiple designations to different accounts to be made per transaction (Trans_TransId).
This design accommodates situations in which the user uses only predefined accounts from the list. However, I also need to accommodate a situation in which the user would like to designate an amount to a certain account that's not in the the Accounts table and for which he/she will provide a description via a text box.
In your opinion, what's the best way to design this database in order to accommodate for those custom accounts?
This scenario is oversimplified for the sake of the question. Let's say I have 3 tables: Transactions, Accounts and Designations.
Transactions table has an primary key called Trans_TransId and keeps track of all contact information associated with a transaction.
Accounts table contains a list of predefined accounts. It has a primary key called Acc_Code and a description column named Acc_Val
Designations table is a relations table which consists of a Trans_TransId, referencing a primary key from Transactions table, Acc_Code referencing a primary key from Accounts table, and Des_Amount which is an mount designated to a particular account for that transaction. This table allows for multiple designations to different accounts to be made per transaction (Trans_TransId).
This design accommodates situations in which the user uses only predefined accounts from the list. However, I also need to accommodate a situation in which the user would like to designate an amount to a certain account that's not in the the Accounts table and for which he/she will provide a description via a text box.
In your opinion, what's the best way to design this database in order to accommodate for those custom accounts?
Comment