SQLite Forum

Are Views just stored SQL Strings or something more?
Login
The view is stored in the sqlite\_master table as plain text - the same text
that you entered to create the view in the first place.  Each time the
schema changes in any way, or when the database connection is first opened,
the sqlite\_master table is parsed and at that point the VIEW is converted
into an internal representation that is used for subsequent queries.

This design has advantages over trying to store views in a binary format:

  1.  The [SQLite database file format][1] is easy to define in a single document.

  2.  We can freely change the internal representation for better performance,
      new features, or just to fix bugs, without breaking backwards
      compatibility with legacy databases.

[1]: https://www.sqlite.org/fileformat.html