tags:

views:

51

answers:

2

I know it can be convenient for a programmer to group different sets of tables into different databases. Is a computational benefit to doing this?

A: 

No, not with MySQL. However, various table handlers have different options for where the physical data is stored. That can be advantageous if you need to get very high performance (for example, putting different data on different disks).

gahooa
but you can do that within a single database
Jim Garrison
+3  A: 

There's no advantage or difference that comes from putting MySQL tables in different databases, except that databases provide a kind of namespacing. That is, you can have two tables with the same name, in different databases.

Otherwise, as long as the databases are managed by the same instance of MySQL Server, you can do anything as if the tables are in one database, including JOIN and even FOREIGN KEY references between the tables.

See also "MySQL: Many tables or many databases?"

Bill Karwin
+1 - had no idea about cross database foreign keys.
Baddie
@Baddie: that's because MySQL basically doesn't have databases, only SCHEMAs.
just somebody
@just somebody - I've seen those two words interchanged so much I assumed they were the samething.
Baddie