Stage 1 · Lesson 6 of 8
The command-line client
Learn the for your database alongside the graphical tool. It is psql for , mysql for MySQL and sqlcmd for . Practise the basics: connect with a host, user and database, list the tables, describe one table, run a script file and quit.
Servers, and usually have no graphical tool. Restoring a dump (a backup file) or running a migration by hand also happens in the terminal. Each client has its own shortcuts. psql uses backslash commands such as \dt, mysql uses SHOW and DESCRIBE, and sqlcmd runs a batch only when you type GO.
Common traplearning only the graphical tool, then freezing the first time you need to check something on a server over SSH (a remote terminal connection).
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- CourseFreeCS50's Introduction to Databases with SQL
Harvard University · Beginner
Watch Lecture 0 (Querying) for the relational model; it uses SQLite, and the ideas carry straight across
- GuideFreePostgreSQL Tutorial
PostgreSQL Global Development Group · Beginner
The short official tutorial: Chapters 1 and 2 cover creating a database and your first tables