I am preparing a web site for a friend and I am not sure what is the best way to do my To give you an idea of one of the database tables, it is almost that I have
table: member_profile `user id` plan id``` firstname '' lastname` dob`` phone `Allow ID 'website` `Allow notebook comments'' AllowNewsBlog Comments`` Please enter a newcomer to the newcomer commons. Display the terms of the newcomer. AllowContentsNameUserComments DisplayMyLocation (and possibly more boolean fields to be added in the future) will control some website functionality based on user's preferences.
Actually I'm not sure that I should move those fields to the new table member_profile_settings
Allow user IDsNewsUzar Commands`` Non-UserBlog Commerce`` Required CaptchaFireNoneUser Comment`` DisplayMyolocation`` Or if I should just leave it member_profile < / Strong> will be part of the table because each member The settings will be themselves The goal is about 100,000 members in the long run and from 10k to 20k in the short term. My main concern is database performance.
and when I am at that question # 2) Is the address table in this member's contact information such as Address gate, member_profile table Having and currently AddressID , city, state, zip, phone etc. . Thank you
I answer "no" and "yes, but" 1 And 2) For # 1, if you make columns for each preference, then managing your questions will be very easy. Moving the preferences into a separate table with the "user, priority, value" triple, which I have worked with, has led to intricate questions that are included in many tables to see a setting. Go. For # 2: There is no other reason to know the table, because the single "Address ID" column means that there is only one address per member, and then, it just Will complicate the questions. If you change it backwards and have an address table that embeds the user's ID, which it can understand; This makes the phone number even more understandable in this way, because people often have many phone numbers.
Comments
Post a Comment