From the course: From Excel to SQL

Setting up your environment for SQL

From the course: From Excel to SQL

Start my 1-month free trial

Setting up your environment for SQL

- [Instructor] So before you can dive in and start learning how to write and run SQL queries, you're going to need to do a little bit of setup. Specifically, you need a tool that can interpret your SQL scripts and return results from a database. The database we're going to use throughout this course is an SQL Lite database. And the tool will be using to write and interpret those scripts is called DB browser for SQL Lite. DB browser as I refer to it throughout this course is a free tool for working with the SQL Lite database engine and it works on all platforms. There are many different SQL database engines out there including MySQL, Microsoft SQL server, and Oracle Databases to name just a few. For this beginner's course, I wanted something easy to set up and use out of the box. You can download DB browser from sqlitebrowser.org, and that's one L. And just go ahead and download the version appropriate for your platform and then run the installer. And I'll go ahead and do that here. Next, you want to download the exercise files from the course page. I went ahead and did that here and I'll open that up. All right, so we're ready to go. So let's open DB browser and then load the sample database from the exercise files. So firstly, I'm going to double-click DB browser on the desktop, and next I'm going to go to file, open database and then navigate to my exercise files which I have on the desktop. And here you can see company database.db. I'm going to click it and then click open. And there we go. The database is now open in DB browser. Now that database is loaded, let's take a moment to explore DB browser. Along the top here you'll notice there are four tabs. The first tab is called database structure, and this shows what tables this database contains. As you can see, there are three tables. You can expand each tables details using the arrow to show the column names and data types contained in each table. The next tab along is the browse data tab. And this tab allows you to view the contents of each of the tables by selecting the tables names from this dropdown. You can see that by selecting the table name, the area below is updated with the contents of that table. So here I have departments and employees. The edit programs tab is specific to SQL Lite and we don't need to worry about using it for this course. The final tab is the execute SQL tab, which we'll use heavily throughout this course to write and run our SQL scripts. Don't worry too much about it now but it's important to know it's here. The exercise files also contains a sample Excel spreadsheet which I will refer to throughout the course. To be able to open the spreadsheet locally, make sure you have access to Microsoft Excel. If you have DB browser and Microsoft Excel set up on your machine, then you're ready to go. So let's get, you started learning about SQL, and how it can help you work with your data.

Contents