January 2020
Intermediate to advanced
530 pages
11h 11m
English
Let's create the databases our application will use for storing and processing customer and transactions data.
Log in to the banka user with the password you created earlier, and connect to the postgres command line, like this:
$su - banka$psql banka
Create a customers table for handling customer data. To do so, run the following query on the postgres command line:
CREATE TABLE customers( user_id serial PRIMARY KEY, name VARCHAR NOT NULL, address VARCHAR NOT NULL, account VARCHAR NOT NULL, balance INTEGER NOT NULL);
The relation will store the user_id that is automatically generated, the customer's name, the customer's address, their account number, and their current balance.
Create a transactions table for ...
Read now
Unlock full access