When a form submission is made on a website:
An email with form's details is sent to a set of recipients email addresses stored in a DB.
The email contains a link for the recipient to show interest. When the link is clicked a response is sent to server with verify_code. The server will UPDATE the table below setting has_confirmed to true or 1 to record their interest on DB.
An email is sent back to the recipient as acknowledgement
This is the current table to record the above:
RequestSentConfirmation
Sent_ID (int) PK
Request_Id (int) FK
Recipient_Id (int) FK
verfied_code (varchar(100))
has_confirmed (bool)
when_confirmed (datetime)
Request_Id is ID to form submission details stored in another table. Recipient_Id is ID to recipient email addresses stored in another table.
Is it better to store the has_confirmed in the same table as above.
The confirmations are required to collect and generate an invoice for each recipient. To generate an invoice from above table I will need to run SQL script to check which sent emails are confirmed.
Or best to store the confirmations in separate table? That way I could run reporting script on the separate confirmation table to generate invoice for each recipient?
Is there a better way to design this with DB since I'm using emailing here.