On a website I'm building user's can subscribe to newsletters by entering their email address into a form and submitting. This will then add them to a 'Newsletter_Subscribers' table in the database.
Users can also sign-up to the website by entering their username/password/email details. They also have the option of subscribing to the newsletter. If they choose to do this then their email address is added to the 'Newsletter_Subscribers' table.
However, I wish to make the data more consistent rather than storing the email address into two different unrelated tables in the database.
Has anyone tackled this issue before, and what is the best way to go about storing this information?
One idea I had was to have a 'Users' table, a 'Users.Members' table and a 'Users.Subscribers' table. All three would have a relating UserID column, with the email address stored in the 'Users' table but I'm not sure this is the best method as I would also
wish to store the Username/Password in the 'Users' table in case we had a 'Users.Advertisers' table for example.
i suggest u add a field : called subscribed in user table with data type bit, 0 for false, 1 for true, if a subribe checkbox is ticked then pass 1 (true) else 0 false, to get subscribers add where subscribed = true
i suggest u add a field : called subscribed in user table with data type bit, 0 for false, 1 for true, if a subribe checkbox is ticked then pass 1 (true) else 0 false, to get subscribers add where subscribed = true
However I understand the workings of a bit datatype, I'm more interested in the best way to normalize this data.
What if a user (who is not registered) submits their email address into a newsletter subscription form? You think they should be added to a Users table?
What if this user then goes to register on the website? Its going to appear that they are already registered, when in reality they have just signed up to receive newsletters.
I suggest that you use a User table, to contain the user information of email address and login information. You will need to consider information flow. This means confirmation emails for both newsletter subscription and account verification.
Click "Mark as Answer" on the post that helped you.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239
Marked as answer by CurtWRC on Jun 14, 2010 04:15 PM
CurtWRC
Participant
1131 Points
1026 Posts
Best way to store members and newsletter subscribers in database
May 18, 2010 09:11 AM|LINK
On a website I'm building user's can subscribe to newsletters by entering their email address into a form and submitting. This will then add them to a 'Newsletter_Subscribers' table in the database.
Users can also sign-up to the website by entering their username/password/email details. They also have the option of subscribing to the newsletter. If they choose to do this then their email address is added to the 'Newsletter_Subscribers' table.
However, I wish to make the data more consistent rather than storing the email address into two different unrelated tables in the database.
Has anyone tackled this issue before, and what is the best way to go about storing this information?
One idea I had was to have a 'Users' table, a 'Users.Members' table and a 'Users.Subscribers' table. All three would have a relating UserID column, with the email address stored in the 'Users' table but I'm not sure this is the best method as I would also wish to store the Username/Password in the 'Users' table in case we had a 'Users.Advertisers' table for example.
Any help much appreciated.
Thanks
Curt
pnthree
Member
34 Points
9 Posts
Re: Best way to store members and newsletter subscribers in database
May 18, 2010 10:01 AM|LINK
i suggest u add a field : called subscribed in user table with data type bit, 0 for false, 1 for true, if a subribe checkbox is ticked then pass 1 (true) else 0 false, to get subscribers add where subscribed = true
table columns: username, password, email, subscribed
Developer(MCPD : Asp.Net 3.5)
pnthree@gmail.com
RSA
CurtWRC
Participant
1131 Points
1026 Posts
Re: Best way to store members and newsletter subscribers in database
May 18, 2010 11:36 AM|LINK
Thans for your reply.
However I understand the workings of a bit datatype, I'm more interested in the best way to normalize this data.
What if a user (who is not registered) submits their email address into a newsletter subscription form? You think they should be added to a Users table?
What if this user then goes to register on the website? Its going to appear that they are already registered, when in reality they have just signed up to receive newsletters.
Thanks again
Curt
TATWORTH
All-Star
72415 Points
14017 Posts
MVP
Re: Best way to store members and newsletter subscribers in databasee
Jun 13, 2010 06:46 PM|LINK
I suggest that you use a User table, to contain the user information of email address and login information. You will need to consider information flow. This means confirmation emails for both newsletter subscription and account verification.
This earns you a point and marks your thread as Resolved so we will all know you have been helped.
FAQ on the correct forum http://forums.asp.net/p/1337412/2699239.aspx#2699239