I'd like to find out what's the best route to take. I want to build a website for a small company that allows online bookings on vehicles. What's the best database to use and what storage medium may i use as backup?

Dani AI

Generated

Good starting suggestions from , and . Since you’ll host on the Internet (per ), pick a stack that makes correctness and operations easy: strong transactional guarantees, simple concurrency controls to avoid double-bookings, and turnkey backups/point-in-time restore so a small team can operate reliably. Managed relational services give those features out of the box. (docs.aws.amazon.com)

For the bookings data itself, use an ACID relational database so invariants live in the DB instead of fragile app code. PostgreSQL is especially useful here: its range types plus exclusion constraints (and, in recent releases, the WITHOUT OVERLAPS convenience) let the database atomically prevent overlapping reservations — far safer than only checking in application logic. Example pattern (Postgres):

CREATE EXTENSION IF NOT EXISTS btree_gist;

CREATE TABLE bookings (
  id SERIAL PRIMARY KEY,
  vehicle_id INT NOT NULL,
  period TSTZRANGE NOT NULL,
  EXCLUDE USING GIST (vehicle_id WITH =, period WITH &&)
);

That enforces “no two rows for the same vehicle have overlapping periods.” (postgresql.org)

Backups: use a layered approach — automated snapshots + point-in-time recovery (WAL/binlog archiving) for fast restores, periodic full logical/physical dumps for long-term retention, and an encrypted off-site copy (object storage). Keep a recent local copy for quick RTO, but push older backups offsite and test restores on a schedule. For MySQL, tools like XtraBackup or managed backups are common; for Postgres use WAL-based PITR. (postgresql.org)

Practical extras: store vehicle images in object storage (S3/GCS) and keep only URLs/metadata in the DB; use a managed DB (RDS/Cloud SQL/Azure) to reduce ops; if you accept payments, use a PCI‑compliant processor and avoid storing card data yourself; always encrypt backups, manage keys separately, and rehearse restores. (docs.aws.amazon.com)

If more detail is wanted on schema patterns, locking vs exclusion constraints, or a simple backup checklist tailored to your provider, include which database and hosting provider you plan to use.

Recommended Answers

All 5 Replies

Most websites use MySQL databases, and most hosting companies have it included in the package you buy.

you can use joomla or wordpress also

AFAIK wordpress is not a database -- it requires MySQL

As for backups -- the hosting company I used had an option to backup the MySQL database onto my local computer's hard drive. From there you can do whatever you want with it. I do not recommend backing up to cloud because of lack of security.

You will find that MySQL and MSSQL are the most common options.

Are you hosting this within the local network or on the Internet?

on the internet

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.