I am writing a virtual banking app. In the app, every time a session is done I want to give the user a receipt with information about the transaction on it. The receipt is a java object and has its own table in the database with the account number acting as the primary key. The problem is, I do not know how to store multiple receipts for the same account number without having to create new rows in the table and repeat primary key values for the account number column. I have read that this is bad practice and would like to avoid it.
2.1m questions
2.1m answers
60 comments
57.0k users