xcandiottix Posted June 8, 2010 Share Posted June 8, 2010 I'm starting a new project to continue my learning of PHP and noticed that on godaddy's hosting service that I have 10 mysql databases. With in each database i can make tables. What's the point? Why not just give me one database if i can put as many tables as I want. My question here is what's considered the best way to use the databases/tables for best performance? Link to comment https://forums.phpfreaks.com/topic/204204-difference-between-using-databases-and-tables/ Share on other sites More sharing options...
F1Fan Posted June 8, 2010 Share Posted June 8, 2010 Well, you certainly could just put every table into one DB. But, there are a few advantages to splitting them up. First: organization. If you're the type of person that organizes your files into folders, it's the same principle. Second: security. If something happened and a hacker managed to inject some SQL into your code somewhere, if you have your tables is several different DBs, they will only be able to affect ones in that one DB. Link to comment https://forums.phpfreaks.com/topic/204204-difference-between-using-databases-and-tables/#findComment-1069560 Share on other sites More sharing options...
xcandiottix Posted June 8, 2010 Author Share Posted June 8, 2010 Ahh okay... i was thinking that it was an organizational thing but that answer seemed too simple for me Okay, well that helps me a lot. Also, the security aspect makes sense too. Thanks! Link to comment https://forums.phpfreaks.com/topic/204204-difference-between-using-databases-and-tables/#findComment-1069563 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.