Quick start – creating your first table
Now that we have PostgreSQL installed, let's get started. The techniques you learn in this chapter are the bread and butter of using a database: inserting data, selecting it, updating it, and deleting it. Then to give you a glimpse of what makes the relational database relational, we'll go over a few basic joins.
For our example, let's build the backend for a basic blogging engine. All blogs have one master entity at the center of all the action: the blog post.
Step 1 – creating a table
Let's start by thinking about what sorts of things a blog post has. In fact, we just want to worry about the information a blog post has exactly such as:
- A title
- An author
- A category
- The date it was posted
- The text of the blog post ...