3 ms·
> 2. Is it possible to build a hybrid database schema? For example, SQLite+JSON? Postgres and MySQL both have JSON support that can do fancy things which inclu
by jtolmar 7y ago
> 2. Is it possible to build a hybrid database schema? For example, SQLite+JSON?
Postgres and MySQL both have JSON support that can do fancy things which includes indexes, but it's extra work and I don't think it actually gains you anything. I'd recommend using regular old columns for anything you ever plan to want a query on. But if you have other stuff, it's perfectly reasonable to dump a bunch of random garbage into a JSON column. People use this for things like user settings, and are generally happy with it.
> 4. Is it possible to build a custom file format based on SQLite or hybrid one based on SQLite+JSON?
SQLite is already basically a file format. You can store JSON blobs in strings somewhere inside it if that's convenient.
- sb8244 7y agoPostgres jsonb column type has worked great without much effort. The old JSON type wasn't great and required special index, but that's decently in the past now. Not sure of MySQL in this aspect.