title: MySQL fixed allowed combinations from multiple tables
body: <p>I am designing a database to organize materials for 3D production.</p>
  
  <p>Materials are named like 1_Fabric_01_Textile_001_BlueJeans_Denim and 2_Metal_02_BrushedMetal_002_ChromeBrushed_Chrome, etc</p>
  
  <p>So, I need a materials table, which basically has information on material name (last value, look above) and a combination of type and subvariant. Each type has allowed variants like 1_Fabric has 01_Textile, 02_Leather, 2_Metal has 01_Metal, 02_BrushedMetal and so on.</p>
  
  <p>Now making all combinations would not be difficult (i.e., being able to choose every possible subvariant for every material type), but I want to limit the combinations to only allowed combinations, so users cannot choose invalid combinations (like 1_Fabric_01Metal or 2_Metal_01Textile).</p>
  
  <p>Any ideas?</p>