On Mar 27, 2018, at 7:26 PM, Keith Medcalf <[email protected]> wrote: > >> The point of JSON support in SQLite, IMHO, is that it allows for >> hierarchical data structures, not something that is easy to do in a >> relational table-based DBMS like SQLite otherwise. > > Actually, it is very simple and straightforward to implement hierarchical > structures using Relational Database Models.
I knew someone was going to pick that nit. I was not thinking of regular hierarchical data structures with that comment, where you can use standard data normalization techniques to encode the hierarchy.[1] E.g. A Person may have multiple Addresses, and each Address may have multiple Phone Numbers, etc. That’s a hierarchical data structure, but not the sort I mean here. I was thinking instead about arbitrary, irregular hierarchies, such as the sort of thing that XML and its dialects are good at expressing, and which can then be queried much more readily queried with XPath than with SQL. If there are straightforward rules for transforming a given hierarchical data structure into flat tables with the hierarchy expressed as table relationships, then from my prior post, you can correctly guess that I recommend that you do that when using SQLite rather than use its JSON feature for this purpose. [1]: https://en.wikipedia.org/wiki/Database_normalization _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

