liveBook · Manning

PostgreSQL

As explained in AI-Powered Developer: Build software with ChatGPT and Copilot

Postgres is an open-source object-relational database management system.

PostgreSQL is an open-source object-relational database management system used here as a local store for an IT asset dataset. Docker provides a quick starting point before schemas, users, tables, relationships, and seed data are added. section 5.1

A practical PostgreSQL setup progresses through these tasks:

  • Run a PostgreSQL container named itam_db and connect to its itam_db database. section 5.1
  • Create an itam schema, application users, and permissions for CRUD access or structural administration. section 5.1
  • Define tables for depreciation strategies, funding details, and assets, using primary keys, sequences, and foreign keys. section 5.1
  • Populate tables with generated records and map database structures to Python ORM models. section 5.1

Starting a local database

A Docker command starts PostgreSQL with a named container, password, and port mapping: docker run --name itam_db -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 postgres. The database can then receive the itam schema and application permissions. section 5.1

-- Question: What is the command to run a docker container, running PostgreSQL for a database called itam_db. I would like to specify the password for this database.

Browse the prompt used to generate the PostgreSQL Docker command, then compare it with the resulting container configuration. section 5.1

How AI-Powered Developer: Build software with ChatGPT and Copilot covers it

How deep it goes
Builds a working schema with permissions, keys, sequences, generated data, and ORM mappings, but does not discuss PostgreSQL internals.
Examples
Uses an itam_db container, itam schema, role permissions, relational tables, generated asset records, and Python ORM classes.
What it assumes
Assumes familiarity with SQL, command-line execution, and application development while using Copilot to fill command and schema gaps.
What you can do after
Operate/configure a local PostgreSQL instance, create an application schema, load relational data, and connect it to ORM models.
How it connects
Connects Docker, SQL schemas, access control, primary keys, sequences, foreign keys, data generation, and object-relational mapping.

Also explained in

Compare how 11 books explain PostgreSQL →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI-Powered Developer: Build software with ChatGPT and Copilot. The section links point to the parts of the book it draws on.