Let’s start off with a quick refresher on what a database is. A database serves as a container to hold the table/tables, which structures and organizes the data within.
Something to keep in mind is that there is no case sensitivity in SQL, but best practice is to capitalize the SQL reserved words in order to differentiate the SQL from any other text we write.
First thing we will do is to create a database within the DBMS (I’m using MySQL). So, we start off by typing in the following statement in our query window:
CREATE DATABASE [enter in the name of your database here];
My database will be named cattyDB, so I will enter the below and execute the statement (by clicking on the lightening bolt icon) :
CREATE DATABASE cattyDB;
Once the database is created, we need to indicate that we want to use that database. So, we will enter the statement below and execute:
USE cattyDB;
Alternatively, we can right click on our database under the Schemas tab, and click “Set as default schema”.
In order to drop a database, we would enter the below statement:
DROP DATABASE cattyDB;
In order to make the database Read Only, enter the below:
ALTER DATABASE cattyDB READ ONLY = 1;
When in Read Only, we won’t be able to make any changes to the database, but we’ll still be able to access the info within. For example, if we tried to delete this database at this point, we will hit an error and that action will not be allowed.
To turn off Read Only mode, we can enter the below:
ALTER DATABASE cattyDB READ ONLY = 0;
Now, we will be able to make any changes or drop the database if needed.

