I have two tables I created a junction table called “recipes_ingredients” My first question is: is it correct how I created the “recipes_ingredients” table? Do I need the “id” or I can just have the two foreign keys “fk_recipe” and “fk_ingredient”? And the second one is if it’s possible to autopopulate the junction table when I insert a record in
Tag: junction-table
Junction table indexing in many-to-many relationship
Let’s say we have a PRODUCT table, ORDER table and a junction table PRODUCT_ORDER. I create a junction table with the following script: Also an index for the PK was created automatically: It is expected that there will be practically only read operations for these tables and I would like to index the junction table intelligently. Usually, I additionally create
Joining three junction tables
my heads hurt from trying to figure this out! I have three tables -Players -Teams -Games Three junction tables with two columns. -player_teams -teams_games -player_games I need to list all Players who …