Organize My Database

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Wackie
Forum Newbie
Posts: 14
Joined: Sat Mar 15, 2008 6:21 am

Organize My Database

Post by Wackie »

Hello all.

I've a domain on a webhotel, where I only can make one database. But I want some structure in my database, is it possible to align some tables to one group, and some others to a second group?

Hope you can help me :)
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Organize My Database

Post by Benjamin »

You can prefix them with a string. So all tables for the first database would start with db_one, for example.
User avatar
Wackie
Forum Newbie
Posts: 14
Joined: Sat Mar 15, 2008 6:21 am

Re: Organize My Database

Post by Wackie »

And how would I do that? I'm not so good with the php or mysql code.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Organize My Database

Post by Benjamin »

If you're not sure how to do that it's not something you should attempt. I would switch hosts and find one that allows more than 1 database, otherwise all the tables are going to be in one database, which will not end up well.
User avatar
Wackie
Forum Newbie
Posts: 14
Joined: Sat Mar 15, 2008 6:21 am

Re: Organize My Database

Post by Wackie »

I see, but I've maybe come up with a solution for my problem. To organize my tables, I just call them GroupA_Name
GroupA_Name2
GroupA_Name3
GroupA_Name4, and so on...

Would that be a good idea?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Organize My Database

Post by Benjamin »

Yes, as long as the code that uses them knows what there names will be.
User avatar
Wackie
Forum Newbie
Posts: 14
Joined: Sat Mar 15, 2008 6:21 am

Re: Organize My Database

Post by Wackie »

Ok, think I will do that, then :) Thank you :D
Post Reply