World Cup Database – Relational Database Course Issues

Hello!

I am currently working through the Relational Database Course – World Cup Database using the desktop version of Visual Studio Code.

I have a question about a possible misspelling in this instruction:

Your games table should have winner_id and opponenent_id foreign key columns that each reference team_id from the teams table

The word opponenent seems to be misspelled. Is this intentional? In other areas of the written instructions it is spelled correctly: “opponent”.

The second issue that I appear to be having is that after I have created my teams table per the instructions I am getting green checks.

Here is the sql commands to view the table as I have it created at present:

\d games
Table "public.games"

Column | Type | Collation | Nullable | Default
game_id | integer | | not null | nextval('games_game_id_seq'::regclass)
year | integer | | not null |
round | character varying | | not null |
winner_goals | integer | | not null |
opponent_goals | integer | | not null |
winner_id | integer | | |
opponenent_id | integer | | |
Indexes: "games_pkey" PRIMARY KEY, btree (game_id)
Foreign-key constraints: "games_opponenent_id_fkey" FOREIGN KEY (opponenent_id) REFERENCES teams(team_id)
"games_winner_id_fkey" FOREIGN KEY (winner_id) REFERENCES teams(team_id)

When I run the checks it is giving me this error:

SUBTASKS 1.1 :5 Your “games” table should have correct “winner_id” and “opponent_id” foreign key columns

I am thinking that the misspelling is the problem. As you can see from my SQL I did as instructed, creating a foreign key called “opponenent_id” but I think I should have not named it that. Instead used the correct spelling opponent_id.

Any help would or insight would be greatly appreciated.

Thank you,
Richard

Yes, that’s misspelled, it should be opponent_id in instructions.

Would you be interested in creating issue for this problem on github or making PR to fix this in the project?

@sanity thank you for following up. That did the trick!

I am happy to help me further with this. If you want to message me separately the github repository details so I can have a closer look.

Thanks again,
Richard

I created an issue on this earlier today: [RDB] Typo in World Cup Database · Issue #45674 · freeCodeCamp/freeCodeCamp · GitHub. Thanks for reporting this @willhousecreative - let us know if you find any more issues.

1 Like