Page 1 of 1

Advices needed about organising DB's

Posted: Mon Oct 25, 2010 10:12 am
by MindOverBody
Hey guys! I got some job to do. Some web page need to be upgraded to have user registration, profiles and so on. Also i need to program simple ad's pages. There is already webpage's database with articles and stuff, and also there is one database for ad's. Now i need to implement user support for registration, adding ad's, etc. Can someone give me advice about right way to implement user database/table? Where to put it? To make new database for that or just to add new table to existing one? In future there will be added disscusion board which will lay on that "registered users" database.

Thanks in advance,
Bojan

Re: Advices needed about organising DB's

Posted: Wed Nov 03, 2010 7:51 pm
by josh
switching databases during a page load takes up a lot of milliseconds, only do it if you have a really good reason. Like legal or technical requirements. (Ex. if you need to install two applications that don't prefix the table names, or your client made you agree to keep his data extra secure and made you pinky promise, or your database was too large for your OS).

You'd need two connections, two different mysql users to even get any security benefit too.

Re: Advices needed about organising DB's

Posted: Wed Nov 10, 2010 7:32 am
by MindOverBody
Tnx for reply. I am going to incorporate it all in one database.

Re: Advices needed about organising DB's

Posted: Wed Nov 10, 2010 7:44 am
by Weirdan
josh wrote:switching databases during a page load takes up a lot of milliseconds,
Do you mean

Code: Select all

use AnotherDatabase;
? It's rarely the way people use multiple databases, usually there are just multiple connections, each to its own database.

Re: Advices needed about organising DB's

Posted: Fri Nov 12, 2010 11:31 am
by josh
I did mention using two connections, as it would be the only way to get the intended security benefits. It still slows your page down if you do it just to do it, right?

Re: Advices needed about organising DB's

Posted: Fri Nov 12, 2010 11:52 am
by Weirdan
josh wrote:It still slows your page down if you do it just to do it, right?
With persistent connections - not so much. They have their own issues though.