I have designed the following but I am looking for a simpler way to design it (currently when I am going to retrieve list of subcategories that user is interested I should have different queries for each type of sport) :
User table has users info each user is interested in number of sport categories, each category has different subcategories, user can be interested in category (all subcategories) or just a number of subcategories of a particular category.
User UserID 12
Sport CategoryID Category 1 Aquatic, 2 Running
Aquatic SubCategoryID SubCategory,CategoryID 1 Swimming 1, 2 Surfing 2
Running SubCateogryID SubCategory,CategoryID 1 200m 2, 2 300m 2
LikeSport UserID CateogryID SubCategoryID 12 1 1, 12 2 nill
It shows user with ID 12 likes Aquatic sport but just Swimming and likes all type of Running Sports.
1 Answer