Creating the database schema
Before we interact with a database, we'll need to actually create a database schema, go figure, as you can't harvest eggs without the chicken. In this section, we're going set up the database schema for our hipstr application, using PostgreSQL.
Note
This section assumes you already have the PostgreSQL database server installed on your machine, and thus, will not guide you through that process. You can download PostgreSQL at http://www.postgresql.org/download/. This book was written using PostgreSQL 9.3.5 OS X application on Mac OS X Yosemite.
You may be asking, "Why a database schema instead of a new database?" You can do either, really. The advantage of creating a new database schema over a database, however, comes in the form of role and user management, which for the most part, we won't get into except to create the user for the hipstr application. Let's do this now.
Perform the following steps as either a super user (if you already have a PostgreSQL super user...