I have a 2 tables: a membership table and mailing list table.
[Members]
Username
Password
EmailAddress
MailingListOptIn [bit]
Planes [bit]
Boats [bit]
Cars [bit]
- The fruits columns are user preferences.
and
[MailingList]
EmailAddress
MailingListOptIn
- A mailinglist'er can opt to receive newsletters but may not necessarily be a member
I would like to start storing preferences for mailinglist'ers. My question is what would be the best way to consolidate these 2 tables data?
I've experimented with the members table storing only member info like username, password etc and a separate profiles table storing the email address and preferences. Both members and mailing list preferences can be stored in this profile table but I can't add an FK constraint cause then I can't add a mailinglist'er.
So right now my options are:
- Stick with the 2 tables but introduce duplicate "preferences" columns on the mailinglist table.
- Use the single profiles table and screw referential integrity.
Or maybe there is another better way?