Forum Moderators: bakedjake

Message Too Old, No Replies

One Database( MySQL) for several applications?

Is there a problem with this.

         

bumpaw

3:54 pm on Apr 16, 2004 (gmt 0)

10+ Year Member



I have a newsletter, calendar, contact form, and site search. Is there something wrong with putting the tables for each of these in the same database. It works, but are all my eggs in one basket here?

ByronM

6:53 pm on Apr 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Poeople do it all the time.

When you say "one database" are you talking one database like using table prefixes to seperate tables or one database server hosting all of your databases?

I like having different databases for each project so i can move them around and maintain them easily, however i have everything on one or two servers that are beefed up and backed up frequently.

drbrain

6:57 pm on Apr 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could put them all in one database, but it would be better to give each application its own database. All of the databases could live on the same server.

You'll thank yourself if you ever need to split the load up.

bumpaw

8:05 pm on Apr 16, 2004 (gmt 0)

10+ Year Member



When you say "one database" are you talking one database like using table prefixes to separate tables

On a shared server we have one database with tables for several applications. This a hosted set up, and I believe the apps are small enough and the load light enough to be OK.

karmov

3:56 pm on Apr 17, 2004 (gmt 0)

10+ Year Member



There's deffinitely nothing wrong with putting them all in the same database, but as mentioned previously it would be best to split them (if you can do it without extra cost). Splitting them can help you by segmenting your data which in handy in case of a security breach or accident and if your load increases, it will make things easier to split as drbrain mentions.

VectorJ

3:08 am on Apr 20, 2004 (gmt 0)

10+ Year Member



Another thing to consider is that a mysql database can only handle so many (1024? I think) concurrent connections in it's precompiled form (on FreeBSD at least). By splitting up the disparate tables into their own databases you allow for putting the DBs on seperate servers, as well as following Good Programming Practice, which almost always ends up being a good idea.

If you can split them up without incurring extra cost, I would. If not, I'd leave it the way it is and just keep in mind that one day you may need to split them up.

bumpaw

3:42 am on Apr 20, 2004 (gmt 0)

10+ Year Member



If you can split them up without incurring extra cost, I would. If not, I'd leave it the way it is and just keep in mind that one day you may need to split them up.

I think this is where we are now. Thanks for all the feedback.