Project: PostgreSQL Installation
In this project, we'll walk through how to install the PostgreSQL database system and the psycopg2 Python library for Windows, Mac, and Linux. We'll focus on installing and running PostgreSQL locally on your own machine instead of on a remote server.
In Intro to Postgres, we discussed the pros and cons of using SQLite and PostgreSQL. Specifically, we discovered that SQLite has the following advantages:
- The database is stored in a single file, making it portable.
- You can use a SQLite database directly from Python; you don't need a separate program running.
- It implements most SQL commands, enabling you to use most of the statements you're familiar with.
Moreover, we found that PostgreSQL is preferred when developing complex applications because you may have multiple processes updating information in the database at the same time. For example, on Facebook, one process might handle updating user information, and another might handle generating the news feed.
2. Installing PostgreSQL
4. Connecting to PostgreSQL from psycopg2