dominicall
11-06-2002, 08:57 PM
Hi
I'm developing a site for a client that provides the functionality to make selections from the database and then send emails to his clients from the site - that part is the easy bit and is already complete.
Am struggling to get my mind around the architecture of storing the communications history, i.e how do I most efficiently store the full communications history for each client.
Assumptions are the I've got a clients table which is fine and a table for storing the campaign summary for each campaign (date, campaign code, copy, SQL used for selection)
My initial thought was to have a promotions history table with roughly the following structure...
Column1: ClientID - int (linked to Client table)
Column2: CommsHistory - varchar
Then for each campaign the campaign-code from the main campaigns summary table is appended to the existing value in the CommsHistory column... e.g.
Client 200 has received 3 campaigns with campaign codes 1234, 5678, 9876
Client 201 has only received 2 campaigns with codes 1234, 7621
Therefore, the data stored in the history table will be (have used the code tags to use tabs)
ClientID CommsHistory
200 1234,5678,9876
201 1234,7621
This would work because I could then select clients by which campaigns they had received (or not) in the past, but I'm sure there must be a better way to do it than this.
Have designed many databases before but not a comms history function and am not sure this is the best approach.
Any suggestions/thoughts gratefully accepted.
Thanks
Dominic :D
I'm developing a site for a client that provides the functionality to make selections from the database and then send emails to his clients from the site - that part is the easy bit and is already complete.
Am struggling to get my mind around the architecture of storing the communications history, i.e how do I most efficiently store the full communications history for each client.
Assumptions are the I've got a clients table which is fine and a table for storing the campaign summary for each campaign (date, campaign code, copy, SQL used for selection)
My initial thought was to have a promotions history table with roughly the following structure...
Column1: ClientID - int (linked to Client table)
Column2: CommsHistory - varchar
Then for each campaign the campaign-code from the main campaigns summary table is appended to the existing value in the CommsHistory column... e.g.
Client 200 has received 3 campaigns with campaign codes 1234, 5678, 9876
Client 201 has only received 2 campaigns with codes 1234, 7621
Therefore, the data stored in the history table will be (have used the code tags to use tabs)
ClientID CommsHistory
200 1234,5678,9876
201 1234,7621
This would work because I could then select clients by which campaigns they had received (or not) in the past, but I'm sure there must be a better way to do it than this.
Have designed many databases before but not a comms history function and am not sure this is the best approach.
Any suggestions/thoughts gratefully accepted.
Thanks
Dominic :D