Jump to content

Difference between using databases and tables


xcandiottix

Recommended Posts

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?

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.