← VCE Spreadsheets, SQL & Visualisation

Naming a database and its tables

A consistent rule for naming a database and its tables, such as a singular noun in lower_case with no spaces or special characters, e.g. student, applied in the same style for every table.

Understanding Naming a database and its tables in VCE Spreadsheets, SQL & Visualisation

What it does: teacher is a singular noun, matching the rule that a table is named after the one type of thing it stores. All three names use lower_case and underscores with no spaces, so the whole database follows one style. Every table should follow the same convention so names are predictable and easy to remember. Symbols like $, #, ! and - can break queries. Stick to letters, numbers and underscores. The first set is all singular and all lower_case. The second mixes singular and plural, and mixes different letter cases. school_library keeps one consistent style and uses an underscore so the name has no spaces.

Common mistakes: A database name must not contain spaces. Use an underscore, as in school_db, so the name follows lower_case with no spaces. Table names should be singular nouns like the others (book, loan). It should be member, not members.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 35–44) and word search (Modules 35–54).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which is a better name for a table that stores student records?
studentStudent Records!
Matches
CREATE TABLE Student Marks
↓
The table name contains a space, so it breaks the rule of no spaces. Use student_mark instead.
Applying
Meanings
Term
naming convention
Meaning
A consistent rule for naming a database and its tables, such as a singular noun in lower_case with no spaces or special characters, e.g. student, applied in the same style for every table.
Practice
CREATE DATABASE school_db;
Testing
Gaps
CREATE TABLE (
Check Answer
Spots
1CREATE DATABASE school db;
2CREATE TABLE student (

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Stag' badge — Forest Legend, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which is a better name for a table that stores student records?
A. Student Records!
B. student ✓
A clear singular noun with no spaces or special characters is a good table name, so student works well.
2. Which table name follows a naming convention with no spaces?
A. class_room ✓
B. class room
Spaces can cause errors in SQL. Use an underscore in lower_case or join words in PascalCase, such as ClassRoom.
3. A database has the tables student, teacher and subject. What is true about their names?
A. They use different styles so each table stands out
B. They use the same style: singular nouns in lower_case ✓
Every table should follow the same convention so names are predictable and easy to remember.
4. Which table name uses a special character that should be avoided?
A. order$item ✓
B. order_item
Symbols like $, #, ! and - can break queries. Stick to letters, numbers and underscores.
5. Which set of table names is named consistently?
A. student, teacher, subject ✓
B. student, Teachers, SUBJECT_table
The first set is all singular and all lower_case. The second mixes singular and plural, and mixes different letter cases.

Match the Pairs

CREATE TABLE student → A singular, lower_case table name with no spaces
CREATE DATABASE school_library → A database name in lower_case that uses an underscore instead of a space
Table names should be singular nouns because each table describes one type of thing → CREATE TABLE teacher
Every table in the database uses the same style → student, class_room, teacher
CREATE TABLE Student Marks → The table name contains a space, so it breaks the rule of no spaces. Use student_mark instead.
student, Teachers, class-room → The names use mixed styles, a plural, and a special character (-). Use student, teacher, class_room instead.

Key Term

naming convention
A consistent rule for naming a database and its tables, such as a singular noun in lower_case with no spaces or special characters, e.g. student, applied in the same style for every table.

Fill in the Blanks

1. CREATE TABLE student ( student_id INTEGER PRIMARY KEY );
Hint: Type the singular, lower_case table name that matches the column prefix below
2. CREATE DATABASE school_records;
Hint: Type the SQL keyword that creates a new database
3. CREATE TABLE teacher (teacher_id INTEGER);
Hint: Type the SQL keyword that creates a new table
4. INSERT INTO teacher (teacher_id) VALUES (1);
Hint: Type the singular, lower_case table name that matches the teacher_id column
5. CREATE DATABASE school; USE school;
Hint: Type the one-word lower_case database name that is reused on the next line

Spot the Error

Question 1
A CREATE DATABASE school db;
B CREATE TABLE student (
C student_id INT,
D name VARCHAR(50)
E );
Line A — A database name must not contain spaces. Use an underscore, as in school_db, so the name follows lower_case with no spaces.
Question 2
A CREATE DATABASE library;
B CREATE TABLE book (id INT);
C CREATE TABLE members (id INT);
D CREATE TABLE loan (id INT);
Line C — Table names should be singular nouns like the others (book, loan). It should be member, not members.
Question 3
A CREATE DATABASE shop;
B CREATE TABLE item (id INT);
C CREATE TABLE sale (id INT);
D CREATE TABLE staff# (id INT);
Line D — Table names must not contain special characters such as #. It should be staff.
Question 4
A CREATE DATABASE tuck-shop;
B CREATE TABLE product (
C product_id INT,
D price DECIMAL(5,2)
E );
Line A — A hyphen is a special character and should not be used in a database name. Use an underscore: tuck_shop.
Question 5
A CREATE DATABASE school;
B CREATE TABLE class room (
C room_id INT PRIMARY KEY
D );
Line B — A table name cannot contain a space. It should be one word: classroom.

Student with a class code? Join your class →