For the purposes of this tutorial, we have re-organized a database script in an SQL file that you can download and run (https://www.dropbox.com/sh/ydl7k4286i99nc3/AACAqYB0wAFB6167ovPctNaSa?dl=0). Please, access the link available. Download the database file named “employees.sql”. As you scroll down, you’ll see the code that will create your entire database. Run the file and wait for a while. Once the execution phase is over, we can refresh the data in our schemas section. The “Employees” database will appear on our list.
We will use the ‘Sales’ database. We will show you how to create your own database, also called schema, starting from scratch. Only in this way can you grasp just how powerful SQL can be. Therefore, first we will define a database, and then create the other components, such as tables and fields. We will use the Data Definition Language CREATE statement to create a database. Quite intuitively, the command we need in this case is CREATE DATABASE. The syntax to abide by is CREATE DATABASE, the optional statement [IF NOT EXISTS], the name of the database, and finally, a semicolon. Let’s break down this entire line to understand the meaning of each element.
CREATE DATABASE will obviously create a database as an abstract unit. This means that for the moment the database will not contain any data and will simply represent an object ready to be filled with information.
365 Data Science is an online educational career website that offers the incredible opportunity to find your way into the data science world no matter your previous knowledge and experience. We have prepared numerous courses that suit the needs of aspiring BI analysts, Data analysts and Data scientists.
We at 365 Data Science are committed educators who believe that curiosity should not be hindered by inability to access good learning resources. This is why we focus all our efforts on creating high-quality educational content which anyone can access online.