One shared layout or flexible records
How flexible record layouts differ from uniform tabular schemas, and why semi-structured data still has a schema. · foundational
A record describes one thing, such as a purchase. Structured data commonly represents records as rows in a table. The table’s schema defines shared columns, their meanings, and their data types. Every row follows those column definitions, even when an allowed value is missing.
Semi-structured data has recognizable organization without requiring every record to have an identical layout. Named fields, tags, and nested values describe each record. Two purchase records can share an identifier and amount while only one includes a coupon field.
For example, a purchase table could define purchase_id, amount, and coupon columns. Flexible JSON records could instead contain {"purchase_id":"p1","amount":25} and {"purchase_id":"p2","amount":40,"coupon":"SAVE"}. The difference is the uniformity of the layout, not whether the data has meaningful organization.
| Layout feature | Structured table | Flexible semi-structured records |
|---|---|---|
| Shared organization | Defined columns | Named fields or tags |
| Record layout | Same column definitions | Fields can vary |
| Optional coupon | Column can hold NULL | Key can be absent |
| Relationships within a record | Defined by table design | Can use nesting |