title: New to MySQL looking for Many-to-Many relationship query
body: <p>Some background I have a set of data that represents the alchemy ingredients and their effects from Skyrim. If you're unfamiliar with this you can combine 2-4 ingredients to make a potion. Each ingredient has 4 effects. If any effects between ingredients are the same it will make that type of potion. I've identified this as a many-to-many relationship and I set up my tables like so:</p>
  
  <p>ingredients: ing_id (key), ing_name, (other supplemental info)</p>
  
  <p>effects: eff_id (key), eff_name</p>
  
  <p>ing_eff_xref: eff_id, ing_id</p>
  
  <p>I would like to input 2 or more available ingredients and return possible combinations without knowing what the effects are. My sql experience is pretty much limited to phpmyadmin and simple select queries. I guess my questions are: is this the right way to structure the tables for this type of relationship, do I need to set foreign keys if I don't plan on updating the tables, and is there a query that can take a set of ing_names and return only eff_names that intersect?</p>
  
  <p>Here is the mysqldump of the db if anyone is interested: <a href="http://dl.dropbox.com/u/59699040/alchemy_db.sql" rel="nofollow">http://dl.dropbox.com/u/59699040/alchemy_db.sql</a></p>