Search code examples
androidsqlitenested-sets

are nested sets possible in Android sqlite database?


Well i have a question I'm making a project with albums and files. Its using a file tree structure and is synced with an website run on Laravel. The website uses nested sets for the data structure.

Is it possible to use nested sets in android and SQLite? if this is possible, how?

if not does somebody know a different solution?


Solution

  • Nested sets are not among the data types directly supported by SQLite.

    It might be possible to use a normalized database schema to store the sets and their values, but querying them would require recursive CTEs which are not supported in most versions of SQLite shipped with Android.