For the MySQL Million Challenge, I was going through the server syntax in order to understand what things can be created in the server. And now my OCD triggered. DDL is a mess.
Creation
As a database developer, I want to be able to create server
objects using the CREATE thing syntax.
The server gives you that for the following things:
- DATABASE
- EVENT
- FUNCTION (and FUNCTION SONAME)
- INDEX
- LOGFILE GROUP (NDB only, not going to look at this)
- PROCEDURE
- RESOURCE GROUP
- ROLE
- SERVER
- SPATIAL REFERENCE SYSTEM
- TABLE
- TABLESPACE
- TRIGGER
- USER
- VIEW
Safe creation
As a database developer I want to be able to script things
safely, so I need IF NOT EXISTS clauses in my
CREATE …