I am building up an e-commerce site.
I am debating on this issue.
The site database would have a table to hold the customers information. Also the site database would have a table to hold the newsletter subscribers information.
For customer information, we need name, address, e-mail, password, shipping address (if different) etc.
For the newsletter subscribers, we only need e-mail and name.
I have been using two approaches before.
Approach 1: newsletter subscribers and customers are in two different tables. Same person will have to register with the newsletter subscribers or customers twice, if they want to be in both. of course, when he register for customer, we have a flag to ask if he want to register for newsletter too. it will register him for newsletter too if he check "yes".
The disadvantage is one user may have two accounts with the same site, one for customer, one for newsletter subscribers.
Approach 2: in the backend database, customers and newsletter subscribers in one table. some users could be only as customers, some only as newsletter subscribers and some as both.
Advantage is one user will only have one account for the same web site. The disadvantage is that in the programming, it add confustion, we have to tell, is this user already in our database yet? as customer, as newsletter subscribers, as both? For example, when a newsletter subscribers try to register to be a customer, we have to inform him, ok, you (or your e-mail address) already register with us as a newsletter subscibers now, so all you need is add some other fields for the address, password information etc., and we will update you to the customer account status etc. It is confusing for the user too.
I prefer to use approach 1. separte the customer and newsletter subscribers in two groups (two tables). Deal with them differently as different accounts even for a same user (e-mail address). In some cases, we may kill two birds with one stone, for example, if a user register for the customer account, and check the e-mail checkbox, he will be resiger for the newsletter subscribers too at the same time (but he will have two separate accounts, one for newsletter subscribers one for customer.)
What is your way?
Thanks!