On this page
flowchart LR
S["./start.sh"] --> C["connect\npsql / DBeaver"] --> Q["first objects\nCREATE → INSERT → SELECT"] --> P["restart\nrows survive"]Diagram source · mermaidcopy included
flowchart LR
S["./start.sh"] --> C["connect\npsql / DBeaver"] --> Q["first objects\nCREATE → INSERT → SELECT"] --> P["restart\nrows survive"]- Start PLOMID
shsource ./start.sh # override: PLOMID_DATA_DIR=./data PLOMID_HOST=127.0.0.1 PLOMID_PORT=5432 \ # PLOMID_USER=plomid PLOMID_PASSWORD=secret PLOMID_LOG_LEVEL=info ./start.shThe server prints a startup banner (
PLOMID ENTERPRISE v0.1.0, wire protocol v3, listen address, auth mode). Leave it running. - Connect
shsource psql "postgresql://plomid:secret@localhost:5432/plomid"DBeaver: PostgreSQL connection, host
127.0.0.1, port5432, databaseplomid, userplomid, passwordsecret. - First database objects
sqlsource CREATE TABLE users ( id BIGINT PRIMARY KEY, name TEXT NOT NULL, meta JSONB ); INSERT INTO users VALUES (1, 'ada', '{"team": "engine"}'), (2, 'grace', '{"team": "research"}'); SELECT id, name, meta->>'team' AS team FROM users ORDER BY id;Expected result: two rows,
teamextracted from JSON. - Prove persistence
Restart the server, reconnect, re-run the
SELECT. Rows survive restart (WAL + storage sync). See Developer storage guide.
Shared example schema#
Most guides reuse this schema so examples compose:
CREATE TABLE users
(id BIGINT PRIMARY KEY, name TEXT NOT NULL, created_at TIMESTAMPTZ DEFAULT now());
CREATE TABLE orders
(id BIGINT PRIMARY KEY, user_id BIGINT NOT NULL, total NUMERIC(12,2) NOT NULL, placed_at TIMESTAMPTZ NOT NULL);
CREATE TABLE events
(id BIGINT PRIMARY KEY, user_id BIGINT, kind TEXT NOT NULL, payload JSONB, ts TIMESTAMPTZ NOT NULL);
CREATE INDEX orders_user_idx ON orders (user_id);
CREATE INDEX events_ts_idx ON events (ts);Next steps#
- First database — schemas,
search_path, multi-database - SQL fundamentals
- Query JSON · Query time · Run transactions
Was this page helpful? Thanks — noted locally, nothing is sent anywhere.