Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/102694-many-small-databases-or-one-big-mysql/
Share on other sites

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.