3 ms·
At the time sqlite was written, the author of sqlite was heavily involved with tcl, a dynamicly typed programming language. Sqlite also started out as a tcl ext
by Skinney 5y ago
At the time sqlite was written, the author of sqlite was heavily involved with tcl, a dynamicly typed programming language. Sqlite also started out as a tcl extension. Having the database match the typing philosophy of the language it was supposed to be thightly integrated with probably seemed like a good idea.
One nice thing that sqlite being dynamicly typed allows for, is having a key-value table for storing singleton objects, like project config (as opposed to having a well defined table with a single row).
- mtzet 5y ago> One nice thing that sqlite being dynamicly typed allows for, is having a key-value table for storing singleton objects, like project config (as opposed to having a well defined table with a single row). If you need to store singleton objects, wouldn't you just serialize manually to a string representation and store them as TEXT? A fancier solution would be something like the JSON type in Postgres. I fail to see how sqlite's dynamic types are helping at all in this scenario.
- scns 5y agoNo need to serialize first? (edit) And deserialize again on read. (edit) Storing project config in Postgres, even though i like it very much, sounds like overkill, excuse the strong words.
- goto11 5y ago> One nice thing that sqlite being dynamicly typed allows for, is having a key-value table for storing singleton objects, OK I can see how this can be convenient. But I would prefer a special-case "variant" column type for such cases and otherwise default to strongly typed columns.
- deleted 5y ago[deleted]