Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How many databases?

Contributor ,
Jun 04, 2009 Jun 04, 2009

Hi:

Let's say for example that my website has a WordPress blog, a Cartweaver shopping cart, and a members-only login section.

Would I want 3 separate databases, or can there be an assortment of tables in a single database?

Thanks for your help!

Rgds, Ned

TOPICS
Server side applications
613
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 04, 2009 Jun 04, 2009

Hi Ned,

You can go either way, but my recommendation is that you keep everything in a single database. It's more efficient to do so and some hosts wont allow multiple databases.

There is one thing you need to be careful of initially... Make sure that none of the tables from one database have exactly the same name as any of the tables in the other database - Obviously this would not be good when it comes time to merge them.  I know the Cartweaver database very well... I wrote it, so I'm pretty certain this wont be an issue, I was very careful to give all the tables what I felt were both descriptive and likely to be unique names, but double and triple check to be sure first.  Then when it comes time to add one database tables and structure to your other database make sure you back up everything first!!!

If you find that there are going to be conflicts, running two seperat databases isn't a disaster, it can be done, but it's not the cleanest or best way to go.

Hope this helps.

Lawrence   *Adobe Community Expert*
www.Cartweaver.com
Complete Shopping Cart Application for
Dreamweaver, available in ASP, PHP and CF

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 05, 2009 Jun 05, 2009

Lawrence_Cramer wrote:

my recommendation is that you keep everything in a single database. It's more efficient to do so and some hosts wont allow multiple databases.

My recommendation is exactly the opposite. I much prefer to keep everything separate. Then, if you decide to move to a different server, you can migrate each database separately, and even to different servers.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 05, 2009 Jun 05, 2009

I am so honored to receive responses from two preeminent scholars of Coldfusion and PHP, despite the fact that they are contradictory

Thanks for your help, Ned

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 05, 2009 Jun 05, 2009
LATEST

Provided that the dbms you are using supports cross database joins in queries, you are always better off using a separate database for each application.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines