A database table organizes related data into named columns and rows. Think of it as a spreadsheet: columns describe attributes, while each row holds values for one record. A relational database is a collection of such tables. section 5.2.1
Video games as records
A games table can give each game a row with columns such as Name, Platform, Year, and Genre. Name and Genre contain text; Year contains a number. Once the data is loaded into SQLite, SQL queries can analyze the full table rather than just the sample shown here. section 5.2.1
Table 5.1 Sample of data table. Each table row describes one video game.
| Name | Platform | Year | Genre |
| Wii Sports | Wii | 2006 | Sports |
| Super Mario Bros. | NES | 1985 | Platform |
| Mario Kart Wii | Wii | 2008 | Racing |
| Wii Sports Resort | Wii | 2009 | Sports |
| Pokemon Red/Pokemon Blue | GB | 1996 | Role-Playing |
The sample makes the row-and-column structure concrete: each row describes a game, and each column supplies a particular attribute. section 5.2.1
Tables also make large amounts of data easier to analyze. A review table, for example, can hold one review per row and columns for its ID, satisfaction flag, and product category. Instead of reading every row, you can ask for an aggregate that reveals a trend. section 2.4
To answer a question about a table using a language model:
- Load the data into a relational database management system such as SQLite. section 5.2.1
- Supply the question and the table structure—including table names, column names, and data types—so the model can translate the request into SQL. section 5.1
- Run the query in the database system, which processes the table and returns a result. Check generated queries rather than trusting them blindly; copy the database before executing them. section 5.1 section 5.5
A table can also be the output of text analysis. For example, extracting requested attributes from emails can produce a CSV file with one row per email and one column per attribute. The model’s answer is initially text, so the extracted values need postprocessing before they form a structured table. section 4.3.1











