Forum Moderators: coopster
I'm asking so that I know while searching for hosting plans (don't mind to get recommendations via sticky mail by the way): how many MySQL databases will I need for a website that should start with 100 pages of content (but to grow rapidly in content), which should be managed by a PHP CMS, and many images for demonstration, and finally forums?
In affect all you need is just the one database. You can use it for as many scripts as you like so long as each set of tables as a unique prefix. Failure to do this could result in the wrong file being updated. I find as a script developer that I like to have seperate databases for each script, that way you dont have to worry when you click 'Empty' on a table. ;)
There are some good hosting packages around that allow you more than 1 database. My own host has unlimited databases even for its basic package.
dc :)
You'll only need one MySQL db. I have access to unlimited dbs with my web hosting, but only use one per domain. Adding more dbs only means having to keep track of which db has which table.
Everyone is different so there are going to be developers on both sides of the fence in regards to 1 or many dbs.
What is more important is that you normalize your tables for fast response.
storyman, thank you. I also see what you mean. You're absolutely right, we acquire different habits and way of management as we go on.
I'm still a newbie to most of this, anyway, so I just have to wait and see which path or method I'm gonna like. But it's definitely great that I heard two sides of the story, or 2 ways of looking at the issue, so this can help me, God willing, in the future.
One question, though, can you tell me briefly what you meant by "normalize" the tables?
Basically, when you normalize a database you are creating tables so data that is repeated can be referenced using a call to the table along with the id number. For example, if you were building a database for you CD collection and want the artist, cd name, and song title represented. Both the artist and cd name could be used numerous times in regards to the song titles.
The idea is that you have a table for the artist and another one for the cd titles. That way in your song table you'd use a reference to the id number for both the artist and cd title rather than duplicating the information.
If you google 'normalize database' you will find a slew of information on best practices. Most people use only the first 3 steps of the process.
I hope that I was clear in that I too use only one database per domain in 90% of the cases. There are occassions that I'll use an additional db. For example, I prefer to give forums their own database.
However, if you are using Fantastico (some hosts offer this...it installs select scripts at a click of a button), Fantastico will only install a script if there is a separate database for each script. That has been the only time I needed more than 1 database.
oceanwave, thank you very much. I definitely wanted to hear that, because I did encounter hosts offering Fantastico as part of their offers, and it is certainly important to know that I need a separate database for any of the scripts I need to install from it. That was good info, thanks again.