SQLite Icon

SQLite

The most used database engine in the world.
16 Stories
All Topics

Richard Hipp sqlite.org

Richard Hipp's single file webserver written in C

Althttpd is a simple webserver that has run the sqlite.org website since 2004. Althttpd strives for simplicity, security, and low resource usage.

As of 2018, the althttpd instance for sqlite.org answers about 500,000 HTTP requests per day (about 5 or 6 per second) delivering about 50GB of content per day (about 4.6 megabits/second) on a $40/month Linode. The load average on this machine normally stays around 0.1 or 0.2. About 19% of the HTTP requests are CGI to various Fossil source-code repositories.

Richard has a knack for creating simple, high quality tools. When we did our (now legendary) show with him back in 2016, he was quite keen on coming back at some point to discuss Fossil. Should we make that happen?

Patrick DeVivo github.com

Reqlite lets you query Redis with SQL

Patrick DeVivo:

This is a project in Go that compiles to a SQLite runtime loadable extension, which brings Redis commands into a SQL context. This allows you to write SQL queries against data in a Redis instance, using Redis commands like LRANGE as SQL functions.

Experimental for now. But why? Patrick says:

In general, Redis is fairly accessible from many programming languages, and any query using reqlite could probably be implemented in a language of your choice using a Redis client. However, sometimes declarative SQL can be a better choice to express what you’re looking for, and that’s where this project may be most useful.

SQLite phiresky.github.io

Hosting SQLite databases on GitHub Pages

The benefits of such a setup are numerous, especially for small sites and side projects:

Hosting a static website is much easier than a “real” server - there’s many free and reliable options (like GitHub, GitLab Pages, Netlify, etc), and it scales to basically infinity without any effort.

The how is also super interesting:

So how do you use a database on a static file hoster? Firstly, SQLite (written in C) is compiled to WebAssembly. SQLite can be compiled with emscripten without any modifications, and the sql.js library is a thin JS wrapper around the wasm code.

There’s more to the story, and the resulting solution is also open source.

SQLite unixsheikh.com

SQLite is the only database you will ever need in most cases

SQLite is so hot right now.

Even if you start out small and later need to upscale, as long as your web application can run on the same machine as the database, which it can in 99% of the time, you can just upgrade the hardware to a beefier machine and keep business as usual.

The only time you need to consider a client-server setup is…

SQLite antonz.org

SQLite is not a toy database

Anton Zhiyanov lays out why he thinks SQLite is awesome:

  • SQLite is the most common DBMS in the world, shipped with all popular operating systems.
  • SQLite is serverless.
  • For developers, SQLite is embedded directly into the app.
  • For everyone else, there is a convenient database console (REPL), provided as a single file (sqlite3.exe on Windows, sqlite3 on Linux / macOS).

This echoes Ben Johnson’s sentiments in our recent conversation with him about Litestream. If you consider SQLite as merely a good databse for things that don’t matter all that much, maybe it’s time to reconsider…

WordPress github.com

Quickly provision a fully functional WordPress site with SQLite

helps you to quickly provision WordPress with SQLite and serve the site using PHP’s builtin webserver. No external WebServer like Apache or Nginx and Database Server like MySQL or MariaDB is required. WPSQLite can give you a completely portable installation of WordPress which you can install even in your pendrive and run on *nix based operating systems, or even on Windows.

This looks like a great option for getting a WP dev environment bootstrapped without much hassle. I didn’t even know you could run WordPress on SQLite…

Patrick DeVivo github.com

Using SQL to query git repos

gitqlite is a tool for running SQL queries on git repositories. It implements SQLite virtual tables and uses go-git. It’s meant for ad-hoc querying of git repositories on disk through a common interface (SQL), as an alternative to patching together various shell commands.

Mine your repo’s history for goodies. Here’s how to get commit count by author email:

SELECT author_email, count(*) FROM commits GROUP BY author_email ORDER BY count(*) DESC

SQLite github.com

Sqlite To Rest

LGTM, but why?

Mostly because I wanted to dig deeper into node web server code, but also because I haven’t jumped onto the NoSQL bandwagon and think that web APIs are extremely useful. The result is a modest attempt at automating the CRUD boilerplate that every developer hates, while following the specs to make API consumption intuitive. I chose sqlite to keep the database side of things simple, with the intent that the API isn’t serving heavy loads.

Git github.com

LiteTree – a modification of the SQLite engine to support git-like branching

Imagine being able to have many connections to the same database, each one reading a separate branch or commit at the same time. Or even writing to separate branches.

This is a good idea and a testament to the versatility of SQLite. Click through to read how it works and how they’ve managed to 2x the performance of SQLite on Linux and macOS.

SQLite changelog.com/posts

Induction - Polyglot database client for Mac OSX supporting PostgreSQL, MySQL, SQLite, Redis, and MongoDB out-of-the-box

Induction is an ambitious new project from Matt Thompson to explore, query, and visualize data from SQL and NoSQL sources including PostgreSQL, MySQL, SQLite, Redis, and MongoDB. While in early alpha, the project shows promise.

Induction

Check out the project web site or grab the source on GitHub to contribute.

0:00 / 0:00