Skip to content
Advertisement

Tag: junction-table

Junction table in PostgreSQL

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

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 …

Advertisement