How to use MySQL?

How to use MySQL?

Setting up a lab or project for MySQL is very similar to other languages on AutoGradr. Since MySQL is a database query language, there are a few things to know about.

  • Remember to change the timeout to 20 seconds when creating questions for MySql
  • If you want to provide a preset database, upload it as pre.sql in the input file for the test case. AutoGradr checks for, and runs pre.sql before each test case.
  • Test cases contain the output data that you expect the students' query to return

The sample question is a good starting point, as it demonstrates how the question should be set up, and how it will run for the students.

Try running this as the solution for the sample question:


USE autogradr;

  id              INT unsigned NOT NULL AUTO_INCREMENT, # Unique ID for the record
  name            VARCHAR(150) NOT NULL,                # Name of the cat
  owner           VARCHAR(150) NOT NULL,                # Owner of the cat
  birth           DATE NOT NULL,                        # Birthday of the cat
  PRIMARY KEY     (id)                                  # Make the id the primary key


results for ""

    No results matching ""