Back to technologies

PostgreSQL

PostgreSQL is an open source relational database. It organizes information into tables that can connect to one another, such as customers, orders, and products.

What you can build or improve

Bookings and inventory

Save related changes in one transaction so an incomplete operation doesn’t leave stock counts or bookings half updated.

Operations reporting

Connect sales, branches, and products so the team can answer business questions without reconciling several spreadsheets.

When we’d choose it

We’d choose it for records that must stay consistent, such as bookings, inventory movements, or customer history.

Why use it

The database can require every order to belong to a valid customer. It can also save several changes together: if one fails, it rolls back the group instead of leaving a partial record.

What to consider

Teams need to design the tables, review queries as usage grows, and test whether backups can be restored.

Illustrative example

Orders and inventory

Placing an order records the sale and deducts stock as one operation. If the item has run out, the order is not recorded as confirmed.

Official documentation

Tools and how they fit together

A well-designed schema preserves the rules of your data. Diagnostics and recovery tools help keep it reliable over time.

Tables and integrity rules

Tables and integrity rules

Use keys and constraints to prevent conflicting records. A transaction lets you record an order and adjust stock together.

  • SQL
  • Constraints
  • Transactions
Queries and indexes

Queries and indexes

Inspect how the queries users depend on actually run. Add indexes based on measurements, since indexes also add work to writes.

  • EXPLAIN
  • Indexes
Backup and recovery

Backup and recovery

A logical export works for some scenarios. If you need to recover to a particular point in time, evaluate a different strategy and test restoration.

  • pg_dump
  • pg_restore

Questions before you decide

Can it be the primary database for a first release?

Yes, when the product works with related records. Decide early which records must be unique and how you’ll test restoring backups.

When should reports move off the main database?

If long queries interfere with orders or other daily work, measure the impact and consider a read replica or a separate reporting process.

Can we change tables while the system is live?

Yes, with planning. Check what the change might block, how to fill in new data, and which application version can use the schema during the transition.

What technology fits your project?

Tell us your idea