booktopia
asked on
Database Structure Newsletter Subscription
I am have an issue when designing a newsletter subscription table.
Here's the problem.
I am trying to store for all my customers the newsletters they have subscribed / unsubscribed to. I have two possible solutions, none of which are too elegant.
1. Add columns to my Customer table one for each newsletter, each column being a BIT. 1 for subscribed, 0 for unsubscribed. However everytime I add a new newsletter I will have to add a new column to this table.
2. Have a Newsletter table which has all the newsletters. Then have an associative entity which links the customer table to the newsletter table and an attribute on this associative entity which states whether the customer has subscribed or unsubscribed. However, the problem here is that everytime I create a new newsletter I have to add a new row to the table for each customer signalling if we are subscribing or unsubscribing them by default.
Anyone got any better solutions?
Here's the problem.
I am trying to store for all my customers the newsletters they have subscribed / unsubscribed to. I have two possible solutions, none of which are too elegant.
1. Add columns to my Customer table one for each newsletter, each column being a BIT. 1 for subscribed, 0 for unsubscribed. However everytime I add a new newsletter I will have to add a new column to this table.
2. Have a Newsletter table which has all the newsletters. Then have an associative entity which links the customer table to the newsletter table and an attribute on this associative entity which states whether the customer has subscribed or unsubscribed. However, the problem here is that everytime I create a new newsletter I have to add a new row to the table for each customer signalling if we are subscribing or unsubscribing them by default.
Anyone got any better solutions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.sourcecodeonline.com/details/imailinglist.html
They have a script to generate a MySQL db, if you can get your hands on MySQL db to view the database structure.
Otherwise i always use a third party software like Constant Contact.