From the course: Advanced Python: Practical Database Examples

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Create a Postgres database

Create a Postgres database

- [Instructor] We'll be using a Postgres database to store our applications, project, and task data. If you haven't installed it, you can install it from the Postgres website. I've already installed it, so I won't be installing it here. Once it's installed, we need to set up our terminal so we can use it. We can do this by adding it to our path. On Mac, this can be done by adding a line to our zshrc file or our Z profile. We have it in our zshrc file. We add the location of Postgres to our path. Perfect. With Postgres installed and the path setup, we can initialize our database. To activate Postgres, we can use psql -U and log in with the default user. Let's create our database. We'll create a database called project tracker. To access our Postgres data, we can use specific commands. For example, we can use slash l to list our databases. Here we have some default ones along with the one we just created. Similar to…

Contents