OK HERE IT IS
To Revise
Stores can belong to many SubCategories.
EXAMPLES:
1. Marilyn's Clothing Depot belongs to the subcategory "Men" and the subcategory "Women" under the main category "Clothing."
- Papaya Clothing belongs to the subcategory "Women" under the category "Clothing."
Categories can have multiple SubCategories.
EXAMPLES
1. Clothing can have Men, Women, Children,etc... as SubCategories.
2. Electronics can have Audio, Video, etc... as SubCategories.
SubCategories can have multiple Stores.
EXAMPLES:
1. The SubCategory "Men", can have the store "Mens Wearhouse" or "GAP".
I have the following TABLES in the Database (streamlined as to avoid having so much crap).
TABLE: Category
PK CatID
CatName
EXAMPLES: Clothing, Electronics, Entertainment
TABLE: SubCategory
PK SubCatID
SubCatName
EXAMPLES: Men,Women,Videos,Audio,Music,Theme Parks
TABLE: Stores
PK StoreID
StoreName
EXAMPLES: Papaya, Marilyn's Clothing, Best Buy, AudioFox, Club Space, Chuck-e-Cheese
There seems to be a many to many relationship from stores and subcategories, so I built a Table for that. But then I figured, and this is where I could be wrong, that a Category can have many SubCategories but a SubCategory can not belong to MANY Categories.
LINKING TABLE: SubCatStores
PF StoreID
PF SubCatID
PF CatID
Does this make sense? Do I need any other tables? If so, I will post the problem I'm having with the QUERY. Thanks and sorry for the long post 🙂