A record is one complete entry in a database table. It is also called a row. Each record contains a value for the table’s columns, such as a username, author, timestamp, or piece of text. section 8.2.1
Records provide persistent storage: unlike an in-memory dataframe row, a database row remains after the program finishes. SQL creates, reads, changes, and removes records. section 8.2.1 section 8.2.4
A record can also participate in table rules:
- A primary-key value uniquely identifies one record; PostgreSQL requires it and prevents duplicates. section 8.2.4
- A serial primary key can be assigned automatically as records are inserted. section 8.2.4
- A foreign key can require a value in one record to match a value in a record from another table. section 8.2.4
User and haiku records
A users table can contain one record for Alice. A haikus table can contain records with an automatically assigned haiku_id, a creation timestamp, the author, and the haiku text. Queries can select Alice’s records, update one by its identifier, or delete another.











