SQLite Adds Zipfile Support
Written by Kay Ewbank   
Thursday, 25 January 2018

There's a new version of SQLIte with support for Zip files, an improved query planner, and a sqlite_btreeinfo virtual table.

 

 

SQLite is an in-process library that implements a self-contained, serverless, transactional SQL database engine. The entire SQL database with multiple tables, indexes, triggers, and views, is contained in a single disk file. 

The most interesting change to the new release is the ability of the Zipfile virtual table to read and write directly to a ZIP Archive. The zipfile module provides two similar interfaces for accessing zip archives. There's a table-valued function, which provides read-only access to existing archives, and a virtual table interface, which provides both read and write access. You can add files to an existing zip archive by inserting new rows, and edit or delete existing files using UPDATE and DELETE.

SQLite has also added the ability to read from WAL mode databases even if the application lacks write permission on the database and its containing directory.

Another improvement is the addition of Append VFS. This is a virtual file system shim that allows a SQLite database to be appended to some other file. The release notes say that a typical use for Append VFS would be to append a database to an executable that then opens and reads the database.

The query planner is another area to have been improved, firstly by extending the optimization that uses an index to quickly compute an aggregate min() or max() so that it now works with indexes on expressions. The second way the query planner has been improved is by avoiding query plans that use indexes with unknown collating functions. Another improvement means the planner now omits unused left joins, even if they are not the right-most joins of a query.

Finally, when deciding whether to implement a FROM-clause subquery as a co-routine, or to use query flattening instead, the query planner now considers whether the result set of the outer query is "complex". The result set is considered complex if it contains functions or expression subqueries, and in that case the decision on which option to choose will be biased towards the use of co-routines.

The command-line shell has received a number of improvements, including the addition of support for reading and writing SQL Archive files using the .archive command; and various new commands including the edit() SQL function, and a .excel command to simplify exporting database content to a spreadsheet.

sqlite More Information

SQLite Site

Related Articles

SQLite 3.20 Improves Query Planner

SQLite 3.17 Adds SHA1 Extensions 

SQLite 3.16 Adds Pragma Functions  

SQLite 3.15 Adds Row Value Support

Portable Version Of DB Browser For SQLite

SQLite 3.9 

SQLite Updated

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

 

Banner


Gain A Python Professional Certificate From edX
20/02/2024

From now until the end of February edX is offering a saving of up to 30% on some of its expert-led courses and program bundles, which is a good incentive for going from thinking about enrolling to act [ ... ]



Dart Adds WebAssembly Support
20/02/2024

Google has released Dart 3.3 with experimental support for applications compiled to WebAssembly, along with new extension types and a revamped JavaScript interop model.


More News

 

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 25 January 2018 )