Page 1 of 1

Organize My Database

Posted: Thu Jun 05, 2008 4:35 am
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 :)

Re: Organize My Database

Posted: Thu Jun 05, 2008 4:36 am
by Benjamin
You can prefix them with a string. So all tables for the first database would start with db_one, for example.

Re: Organize My Database

Posted: Thu Jun 05, 2008 4:39 am
by Wackie
And how would I do that? I'm not so good with the php or mysql code.

Re: Organize My Database

Posted: Thu Jun 05, 2008 4:42 am
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.

Re: Organize My Database

Posted: Thu Jun 05, 2008 4:46 am
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?

Re: Organize My Database

Posted: Thu Jun 05, 2008 4:53 am
by Benjamin
Yes, as long as the code that uses them knows what there names will be.

Re: Organize My Database

Posted: Thu Jun 05, 2008 5:19 am
by Wackie
Ok, think I will do that, then :) Thank you :D