Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 09-22-2021, 07:52 PM   #1
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,129
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?
Publisher Bucks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-23-2021, 12:49 AM   #2
baodb
Confirmed User
 
Industry Role:
Join Date: Jan 2021
Posts: 103
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.
baodb is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-23-2021, 02:04 AM   #3
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
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.
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-23-2021, 07:52 AM   #4
fuzebox
making it rain
 
fuzebox's Avatar
 
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,052
You use one single database across multiple unrelated websites?
fuzebox is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-23-2021, 07:52 AM   #5
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Dont think i ever used single database for multi domains/sites. Different site, different database, end of story.
Klen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-23-2021, 08:51 AM   #6
hornyasf
Confirmed User
 
Industry Role:
Join Date: Jul 2021
Posts: 185
Quote:
Originally Posted by Klen View Post
Dont think i ever used single database for multi domains/sites. Different site, different database, end of story.
Absolutely 100%
__________________
hornyasf is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-23-2021, 09:11 AM   #7
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,129
Quote:
Originally Posted by k0nr4d View Post
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.
Okay cool, thanks, I guess I shall keep things how they are then
Publisher Bucks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
database, sql, databases, method, maindatabase, cars, recipes, tables, adding, pets, single, slew, primary, drawbacks, methods, handle, management, question, casino, store, bonuses, forum, tablename, managing, organizing



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.