Norsk.Firefox Posted April 24, 2008 Share Posted April 24, 2008 Hello Have a question for a portal I'm developing now. Is it better with one big database with a lot of fields, or some few with fewer fields? Example: Table users: - UserID - Username - Email - Zip - Password - And some more And then a table witch has one row for every user: Table settings - UserID - ShowMail - Show Zip Is it better with two, one combined or is it up to the rest of the code? - NF Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted April 24, 2008 Share Posted April 24, 2008 In that case I'd probably just store everything in one table. It would be faster than having to join tables. Quote Link to comment Share on other sites More sharing options...
nloding Posted April 28, 2008 Share Posted April 28, 2008 Depending on the amount of data you have, two (or more) tables would be better. Take a site like MySpace or Facebook -- all that profile information is stored on multiple tables. The two questions to ask are: 1) How much data are you storing, and 2) Will you querying them separately more often than together? What I mean is, will you be having the username and whatnot at the top of every page, and only display the profile information in a single profile page? If yes, then try separating them. But again, if you're only added a few minor columns to the table, might as well keep them one. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.