PDA

View Full Version : Is it ok to use different databases on web site


o0O0o.o0O0o
06-27-2008, 03:17 AM
hi ,



I have always used all the tables inside one database on the website.
Is that the only way or right way to do


or i can use different databases as well.


for. eg


for sales in info i use only separate database

for product separate database and like that

What difference that will make on my current working of website

Len Whistler
06-27-2008, 04:51 AM
You have it right with the one database and lots of tables and columns. It's best to keep everything together.

EDIT: Your example with sales and products could be in two databases, but I see no reason why two databases would be better than one.










---------

gnomeontherun
06-27-2008, 05:44 PM
If you don't require a ridiculous volume of data, then use only one DB. Amazon would use multiple databases for its products, but Granny's Country Gadgets won't. If you don't need to use two, then don't because most often hosts limit your databases.

Essentially the only difference is that you would have to be connecting to more than one database, making more connections can take a little more server power, and could cause more potential points of security vulnerability I would imagine.

o0O0o.o0O0o
06-27-2008, 09:22 PM
The database is only 800MB , i thought it would be simple to back up some databases more frequently rater than entire backup ,

I think one is fine

demtron
07-02-2008, 12:00 AM
I agree with the above posters on the security and processing standpoint. Other thoughts:

1) You may not be able to enforce DRI across databases if that's important to you

2) This adds complexity to the code, which introduces more chances for bugs and errors

Hope that helps!