All Collections
Item Authoring Information
Adding a SQL Database for Assessment
Adding a SQL Database for Assessment
Written by Aimée Gott
Updated over a week ago

Step 1: Upload CSV files

  • Upload one CSV file for every table in your database

Step 2: Create a .sql file

  • Define the tables that should exist in your database

    • Make sure the columns match the CSV file, they should be the same names, types and order

  • Copy the data from the CSVs to the relevant tables

    • Get the links from the teach assets tab

Download an example: spotify.sql

Step 3: Upload the .sql file

Step 4: Define the database in the requirements file

  • In the "Settings" tab, go to "Edit requirements"

  • Add a new block at the end of the file to set up your database (copy/paste and edit one of the existing blocks)

  • Link to your uploaded .sql file in the wget line

  • In the first sudo line, update to the name of your database

  • In the second sudo line:

    • Update to the name of your database

    • Update to your .sql file name

  • Save the requirements

  • Wait for a successful build

  • Use your new database in an item

    • Tip: Try something simple to make sure it is working first

Attachment icon
Did this answer your question?