All videos

Databases · 1:14

Create a database and its tables

Create a database in the Library and ask Chat to add its first table.

Transcript

0:00Create a database and its tables

Sam wants one place to track refund requests. A database keeps them as rows in tables. In Library, choose New, then Database, and give it a name. Create database makes an empty PostgreSQL database and opens it. Schema is empty for now. Tables appear here when an agent creates them. Beside it, the chat works on this database. Sam describes the table in plain words. The agent writes the SQL and applies it as a migration, a change to the schema. A migration is an ordered set of SQL statements. If one fails, the whole set rolls back. Only an Owner can change the schema. Sam created this database, so Sam is its Owner. A card for refund_requests appears in Schema, with each column and its type. Each row also gets an id as its key, so the grid can find the row to edit. Open the table to see its rows. It stays empty until a person, job or app adds one. The chat answer sums up what changed, so Sam can check it before adding rows.