A database is a structured set of data with one or multiple numbers of tables in it to store, query, create, or perform any other kind of processing. Once you have installed the database software such as PostgreSQL onto your computer, the next obvious task is to create a database and then insert tables (actual data) into that database. In this recipe, you will create a database in the PostgreSQL database server.
Creating a table in a database in PostgreSQL
Getting ready
Before creating a data table, you should connect with the database server, and it should run properly onto your computer. The task is to create a new data table called airlinesDB. The data table will contain the following columns:
- YEAR (integer)
- QUARTER (integer...