Create a SQL Assignment
How to create a database template and then a SQL assignment for students to query
Open your class
Enter the class
Create a database template first
The "New Database Template" dialog is open, allowing you to define a database schema with SQL CREATE TABLE and INSERT statements that will be available to students. Notice the checkbox option to "Allow DML (INSERT/UPDATE/DELETE)" which you can uncheck if you want students to only run SELECT queries on read-only data. The blue notification at the bottom confirms that SQL assignments require a database template to be created first.
Define the seed database
The teacher is creating a database template called "University DB" and defining the initial SQL schema in the seed database section. The SQL code creates two tables (students and courses) and populates them with sample data that students will work with in their assignments. Notice that the "Allow DML" checkbox controls whether students can modify the data or only run SELECT queries against this seeded database.
Save the database template
Now create the SQL assignment
Set up the SQL assignment
A teacher is creating a new SQL assignment with the title "SQL Lab 3 — Joins and Aggregates" and has selected SQL as the assignment type. The form shows the University DB database template has been selected, and there's a description field explaining that students will write queries using JOINs and aggregate functions. The assignment is set to be visible to students, with an optional deadline field available.
Create the assignment