Writing a Database Model
Learn how to write a schema and define the functions while writing a database model.
In the chapter “Structured Query Language,” we learned how to write SQL queries as separate .sql
files, and we learned about using query parameters with the psql syntax for that (:variable
, :'variable'
, and :"identifier"
). For writing our database model, the same tooling is all we need.
An important aspect of using psql is its capacity to provide immediate feedback, and we can also have that with modeling. Let’s create the database first.
Get hands-on with 1400+ tech skills courses.