![]() |
How do you Organize SQL Databases?
So after the past couple of weeks, its becoming clear that I need a better way of managing and organizing my SQL databases, at present, I have each database listed by site name, with a table underneath it like this:
domain - tablename But was wondering if there might be a better method, perhaps creating one 'primary' SQL database and then adding a slew of single tables below it: maindatabase - recipes - cars - pets - forum - store - casino - etc Are there any drawbacks or bonuses to using either method over the other or, perhaps, any other methods you might have or currently use to handle database management that may be better still? :question |
I'd say it really depends on how you consume the data and the structure of your application. While there are surely best or common practices that are good to follow as a default, no one can give you a good answer to your specific use case without knowing what the scope of your application is.
|
You should be using a separate db per site for several reasons:
- Table name overlap (you might need a users table on each site) - Security (sql injection on one site will limit damage to the one site and not all your sites). - Portability (you can move a single site to another server if you need) - Corruption (single database getting corrupted can cause complete loss for all your sites) I can't really think of a reason to use a single db like what you are describing. |
You use one single database across multiple unrelated websites? :helpme
|
Dont think i ever used single database for multi domains/sites. Different site, different database, end of story.
|
Quote:
|
Quote:
|
All times are GMT -7. The time now is 12:32 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123