Hi!
I am developing a website that lets registered users to have their own websites like user.domain.com.
I have two tables in my mysql db
First table ACCOUNTS that holds id, login and password.
Second table USERDETAILS which holds id, account_id, some personal user details.
What I need is some more tables for user's website content, galleries and css attributes. Those would have to be linked with user's account id.
User can add following sites to his website (he/she picks it from the list of available types):
HOME
GALLERY
CONTACT
CUSTOM
Now two users can have different number of second level sites, for example:
KATE has only HOME and CONTACT
NATALIE can have HOME, GALLERY, CONTACT and PETS (which is CUSTOM site).
There is unlimited number of CUSTOM sites per user.
Furthermore pictures in galleries are grouped in albums.
As there will be some simple template system based on css attributes there have to be some way of storing them.
My problem is How do i design database like this, and how to split all the data into tables?
Any help on this would be a blessing...