Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Data Model

Tables store your application data. When you describe what you need, the system creates table definitions automatically in tables.bas.

Data Model Flow


What Is a Table?

A table organizes related data into rows and columns, similar to a spreadsheet.

idnamephoneemail
1John Smith555-1234john@email.com
2Maria Garcia555-5678maria@email.com

Creating Tables

Describe what data you need to store.


Adding Fields

Add new fields to existing tables through conversation.


Field Types

TypeUse ForExample
STRINGShort textNames, phones
TEXTLong textNotes, descriptions
INTEGERWhole numbersAge, quantity
DECIMALNumbers with decimalsPrice, weight
BOOLEANYes/No valuesActive, completed
DATEDates onlyBirth date
DATETIMEDate and timeAppointment time

Searching Data

Use natural language to find records.


Linking Tables

Create relationships between tables.


Shared Data

All applications within a bot share the same tables. Change data in one app, and it updates everywhere.

ConceptDescription
One bot = one databaseAll apps share tables
Schema in tables.basSingle source of truth
Auto-syncChanges deploy automatically

TABLE Keyword

Tables are defined in .gbdialog/tables.bas using the TABLE keyword:

SyntaxDescription
TABLE nameStart table definition
field AS TYPEDefine a field
END TABLEEnd table definition

FIND Keyword

Query data using the FIND keyword:

SyntaxDescription
FIND * IN tableGet all records
FIND * IN table WHERE conditionFilter records
FIND field1, field2 IN tableSelect specific fields

Next Steps