Best table structure for a table that organizes items by category, subcategory1, subcategory2, subcategory3
I was thinking there would be the category name and id table, eg
cat_id,cat_name
1, teen
2, college girls
3, mature women
and a subcategory table, eg
sub_cat_id, sub_cat_name
1, busty
2, athletic
3, blonde
4, brunette
etc.
and then the item table
women_id, name, age
1,anna, 19
etc.
Since it's possible to have multiple subcategories, I would need a 4th table that would hold all the relationships.
cat_id, sub_cat_id, women_id
1,1,1
1,2,1
1,3,1
My concern is that this 4th table that everything hinges isn't based on a primary key and can get quite huge.
Is this the optimal way to solve this problem?
Best way to set up these tables...?
Moderator: General Moderators
^_^
id,type,bodytype,name,age
1,teen,athletic,anna,19
2,mature women,busty,jenny,95
4 tables, into 1.
1,teen,athletic,anna,19
2,mature women,busty,jenny,95
4 tables, into 1.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Good idea having the categories as foreign keys - less typing less chance of spelling mistakes - but you don't need a table full of them just add them into the item (women are items?) table:
Mac
Code: Select all
woman_id name age cat1 cat2
---------------------------------
1 anna 19 1 1