Search code examples
sqlitecouchbase-litenosql

How Couchbase Lite use SQlite for NoSQL data


While SQLite is for relationnal database, how couchbase use it for NoSQL data queryable ?


Solution

  • Couchbase Lite can use different storage engines internally.

    In the SQLite case, the main document body is stored as a blob. Most of the data in the tables actually has to do with tracking revisions, views, supporting sync (replication), and so on. (This is as of version 1.4.0.)

    So, to answer what I think is the main point of your question, CBL isn't turning documents into tables the way you would if you were trying to store the data directly in SQLite.

    These are, of course, implementation details you should not rely on. If you're interested in finding out more, you can look at the source (Couchbase is open source) and use standard SQLite tools to examine the database itself.