Create Database
CREATE DATABASE college; makes an empty cupboard. Nothing is in it yet — no tables. Names are usually lowercase, no spaces. Then USE college; so the next CREATE TABLE goes inside it.
CREATE DATABASE IF NOT EXISTS college; is safer in scripts — it won’t error if the DB already exists. SHOW DATABASES; lists them. You should see college in that list after you create it.
One project, one database, is the student habit. Don’t put students and a shopping cart in the same DB unless it is the same app.
Trap — CREATE DATABASE then forgetting USE — tables land in another database and you think they ‘vanished’.
On the example next to this theory — CREATE DATABASE makes a schema; USE selects it for following statements.
CREATE DATABASE college; USE college; SHOW DATABASES;