World Cup Database - Build a World Cup Database

Tell us what’s happening:
Hello, I don’t have any issues with the project but I would like to know if there is somebody or a group where I can ask for some help. I have some problems with the logic and would like to ask a question: for example about the teams. I have two columns that I have to use to fill in the team column in the database without repeating any of the teams. I can’t wrap my head around it. Also, would you guys recommend any materials I could read and use to help me with this project. In order to complete it I will redo Learn SQL by Building a Student Database: Part 1, I did it once, I’ll do it again. Any help you can throw at me, I appreciate it. Thanks

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36

Challenge: World Cup Database - Build a World Cup Database

Link to the challenge:

the two places for asking for help is here (exactly where you posted) or in the freecodecamp discord forum.

According to the user stories:

Your teams table should have a team_id column that is a type of SERIAL and is the primary key, and a name column that has to be UNIQUE

So just create that table and insert all the unique teams into it for all the countries.
there are many ways to do this algorithm. One possible way is to read the csv line by line and insert the name of the team if (and only if) it is not already in the table.

another way may be to extract the names first then sort them into a list of unique names which are to be inserted.

Do whichever you know how to do.

1 Like