- You should create a database named
worldcup
- You should connect to your worldcup database and then create
teams
andgames
tables - Your
teams
table should have ateam_id
column that is a type ofSERIAL
and is the primary key, and aname
column that has to beUNIQUE
- Your
games
table should have agame_id
column that is a type ofSERIAL
and is the primary key, ayear
column of typeINT
, and around
column of typeVARCHAR
- Your
games
table should havewinner_id
andopponent_id
foreign key columns that each referenceteam_id
from theteams
table - Your
games
table should havewinner_goals
andopponent_goals
columns that are typeINT
- All of your columns should have the
NOT NULL
constraint - Your two script (
.sh
) files should have executable permissions. Other tests involving these two files will fail until permissions are correct. When these permissions are enabled, the tests will take significantly longer to run - When you run your
insert_data.sh
script, it should add each unique team to theteams
table. There should be 24 rows - When you run your
insert_data.sh
script, it should insert a row for each line in thegames.csv
file (other than the top line of the file). There should be 32 rows. Each row should have every column filled in with the appropriate info. Make sure to add the correct ID's from the teams table (you cannot hard-code the values) - You should correctly complete the queries in the
queries.sh
file. Fill in each emptyecho
command to get the output of what is suggested with the command above it. Only use a single line like the first query. The output should match what is in theexpected_output.txt
file exactly, take note of the number of decimal places in some of the query results
- Bash
- PostgreSQL
- Visual Studio Code
- Coded with 💙 by Kirsten Canfield