Hi, Thank you all for the answers.
Petite Abeille writ 2014-03-18 19:22 GMT+01:00 Petite Abeille <petite.abei...@gmail.com>: > If, for some reasons, you cannot even accomplish first normal form [1], i.e. > one and only one value per column, > well, then, maybe, a relational database is not the right tool for the task > at hand. Some answers already suggested to normalize key-values. While I know this EAV pattern I'm still open for implementations which are able to process KVP as a data type. And, actually, as you may have realized, PostgreSQL proved that even (post-)relational databases can handle KVP efficiently. So, I'm considering to follow-up Tiago's proposal either 1. to create function similar to PostgreSQL (with the problem that SQLite has no types and thus can't optimize the index) - 2. or to write at least a casting function which takes the key-value string syntax and converts it into rows (pivot)?? -S. 2014-03-18 19:22 GMT+01:00 Petite Abeille <petite.abei...@gmail.com>: > > On Mar 18, 2014, at 2:46 AM, Stefan Keller <sfkel...@gmail.com> wrote: > >> Any suggestions on how to query this most efficiently (like [select >> value from "some_key"])? > > As mentioned, turn this construct into a regular relational table structure. > > If, for some reasons, you cannot even accomplish first normal form [1], i.e. > one and only one value per column, well, then, maybe, a relational database > is not the right tool for the task at hand. > > [1] http://en.wikipedia.org/wiki/First_normal_form > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users