From the course: Choosing a Database: PostgreSQL, MySQL, Mongo, and Cloud

Setting up the environment - SQL Tutorial

From the course: Choosing a Database: PostgreSQL, MySQL, Mongo, and Cloud

Start my 1-month free trial

Setting up the environment

- [Instructor] So now I'm going to show you how you can set up an environment to follow along and write SQL queries in. So there are a couple of different applications you can use for this. If you just search, you know, different IDEs, you'll come up with a lot of different options. Most of them are free, too. Or at least come with a free trial. So this one I'm using here, this is the one you'll see throughout the course. And this is the one that I like to use at work. This is called DataGrip. You can download this for free from their website and we can create a new connection like this. So you can either click here and do a new data source. And you can see there a lot of different data sources. We really only cover very few things in this course. But let's go ahead and click Postgres just because that's the next thing we're going to do in this course. And it automatically sets up Postgres to the local hosts. Meaning that all the data, everything, is connected to my computer. We're not connected to an external database. So, if you do this professionally, you'll always connect to your company's database, whether it's through like a URL, for example. You'll connect to that host. In Mongo I also created a database URL, but for Postgres, I just did it on my computer. So I'm going to go ahead and put in my username and password. You can see it automatically connected. So I had created this authentication earlier. You can do that as well. And once everything looks good, you can just click "Okay". So you can see that it added a new data source. And the coolest thing about using something like DataGrip is you can work in different files at the same time. So I can work on Mongo and Redshift and Postgres all at once in this application. So we're going to go ahead and open our Postgres database. And this is completely new. What it has in here is just everything that Postgres comes with. This is actually from the course earlier that I had already built. So here, we're going to go ahead and create a new schema. So we'll just write "create schema" and we'll call it "new Postgres connection". So we're going to go ahead and run that. And you can see it automatically created a schema here. We try to open it. There's nothing inside it so we can create tables in it. We can create views, you know, all sorts of fun things in there. Which we're going to do later on in this course. So that's how you can create a connection on your computer and write in SQL as well.

Contents