SQLite as a document database
Created on 2020-12-01T20:24:22-06:00
- Uses the "generated always as" condition in a column.
- Uses the "json_extract" function.
- Allows pulling data out of a JSON dictionary in to a column which may then have an index added to it.
- The "generated always as" condition ensures only valid JSON is inserted in the table as well.
- Constraints on generated columns are enforced at insertion time.
Virtual vs Stored column
- Virtual columns can be added with "alter table."
- Virtual columns are computed each time the record is looked up.
- Stored columns are cached; they are not extracted each time the column is viewed.
- Stored columns can not be added with "alter table."