I am looking around for an example tutorial or answered question specifically to the scenario below. Any help is appreciated.
There are a total of four tables:
1 - Category (PK, CategoryName) Example data:
[1, Category 1]
[2, Category 2]
[3, Category 3]
2 - SubCategory (PK, SubCategoryName) Example data:
[X, subcategory 1]
[Y, subcategory 2]
[Z, subcategory 3]
3 - MappingCategories (Category PK, SubCategory PK) Example data:
4 - Final Table (ColumnA, ColumnB…Category PK, SubCategory PK) Example data:
[ Data1a, Data2a…1,Z]
[ Data1b, Data2b…2,Y]
How do I go about setting up a dependent dropdown with MappingCategories table? I want to select a category and will only display the appropriate sub categories. In addition, I want the CategoryName and SubCategoryName to be displayed instead of the primary keys.
The data needs to be modeled like this so that the CategoryName and SubCategoryName text could change at a later point. This way the primary keys are referenced (which will not change) and the Name is properly referenced - regardless of name change.
I appreciate any help.