PART 2 · COMMAND-LINE AND GRAPHICAL CLIENTS
An Engineer's Tools: When to Use the CLI and When to Use the GUI
Developers and administrators should have both types of tools at their disposal—each has its own area of responsibility
Command-line clients (CLI): psql, redis-cli, mongosh
Graphical user interfaces (GUI): DBeaver, MongoDB Compass
• They work anywhere: inside a Docker container, via SSH on a headless server, in CI/CD pipelines, and in cron scripts.
• Zero overhead and automation: accept scripts from stdin and return a strict exit code on errors.
• Streamed data transfer: The client-side `\copy` command in psql downloads gigabytes of CSV data directly without freezing the interface.
• Clear visualization: a tree view of schemas, tables, foreign keys, indexes, and roles all on a single screen.
• Reverse ER diagram (Reverse Engineering): Automatic rendering of actual relationships in a live database.
• Easy exploration: filtering of table selections, highlighting of document types in Compass, and a visual query plan.
Customer Chart for the DBMS Course
• PostgreSQL: CLI — psql (plus the pg_dump and pg_restore utilities) · GUI — DBeaver, DataGrip, pgAdmin
• MongoDB (Lesson 3): CLI — mongosh (plus mongodump / mongorestore) · GUI — MongoDB Compass (schema and index analysis), DBeaver
• Redis and ClickHouse (Lessons 3–4): CLI — redis-cli, clickhouse-client · GUI — Redis Insight, DBeaver (via HTTP port 8123)
Rule: Design and verify relationships visually in DBeaver, and run migrations, dumps, and checks in psql with the -v ON_ERROR_STOP=1 flag.