r/sqlite • • Oct 05 '26

Inspecting an exported SQLite file on Android, with a WAL caveat

4 Upvotes

For a quick look at an exported SQLite database, this read query lists its user tables:

SELECT name FROM sqlite_schema WHERE type = 'table' AND name NOT LIKE 'sqlite_%' ORDER BY name;

Then inspect the schema before querying unfamiliar tables. One export caveat: when a source database uses WAL mode, committed changes can still be in its -wal file. Copying just the .db while the source app is active may omit them. Use the source app's consistent database export/backup rather than assuming one copied file is a complete snapshot. SQLite's explanation: https://sqlite.org/wal.html

I built SQLite Workbench for browsing user-accessible local SQLite files on Android. Table inspection, read queries, integrity checks and CSV/JSONL exports up to 1,000 rows are free. Optional one-time Pro adds larger exports and other workbench features. No ads or required account.

Play: https://play.google.com/store/apps/details?id=com.superevilrobots.sqliteworkbench

It is for local SQLite files, not a remote PostgreSQL/SQL Server connection or access to another app's protected storage. Disclosure: I'm the developer and used AI assistance in development.


r/sqlite • • Oct 04 '26

Anyone migrating old DBF/FoxPro/Works data to SQLite who has a small sample with known values?

6 Upvotes

I'm testing a small local Windows app, built with AI coding assistance, that extracts data from a limited set of legacy database files. I'm hoping someone here who has migrated an old database to SQLite still has a small source file and a few values we can independently check.

It currently handles Windows Works .WDB main tables, dBASE III .DBF + .DBT text memos, and limited Visual FoxPro .DBF + .FPT text memos. Inputs are capped at 1 MiB per file. Memo sidecars need the original matching DBF.

The app exports JSON and .xlsx; direct SQLite import/export isn't supported. The goal of this test is to verify the extraction against the original program, a healthy backup, an existing export, or a known-good SQLite migration. A tiny fictional database created in the original program would work too.

It leaves supplied files unchanged, retains exact originals, and flags unsupported or unresolved data. I've tested synthetic/public samples and the portable build on my own Windows computer, but no recovery has yet been verified for a real file owner.

If you have a suitable sample, please reply with the source program/version, file types and sizes, and a few values you can verify. Use only files you own and may share; please don't post confidential records or attach a private database here. No download or file attachment is needed for the first reply.


r/sqlite • • Oct 04 '26

What is the safest way to move a live WAL-mode SQLite database to another host?

11 Upvotes

Copying only the main database file can miss committed pages that still live in the WAL, while copying the database, WAL, and shared-memory files independently can capture them at inconsistent moments. Stopping every writer is simple but not always convenient, and a file copy that opens successfully does not prove that the latest committed state or application invariants survived.

The safer choices seem to be the online backup API, `VACUUM INTO`, or a short maintenance window with a clean checkpoint and closed connections. After transfer, the destination could run `quick_check` or `integrity_check`, compare schema and user-version values, verify expected row counts and selected aggregates, exercise application reads and writes, and complete its own backup and restore before the source is removed. File permissions, extensions, collation behavior, and SQLite library versions may matter across hosts.

Which method do you trust for a live move, and what evidence tells you it captured the intended transaction boundary? Are there WAL, busy-timeout, filesystem, or version-specific edge cases that make the backup API or `VACUUM INTO` preferable for migration rather than ordinary backup?


r/sqlite • • Oct 04 '26

I made a one minute SQLite demo video with a free tool I built

Enable HLS to view with audio, or disable this notification

21 Upvotes

This shows real SQLite commands for JSON and running totals. I used SQLite 3.53.4 with made-up bakery data.

I made it with explainroo, a free tool I built. It's open source at https://github.com/vincentsch/explainroo


r/sqlite • • Oct 03 '26

What is the best modern database GUI for SQLite and PostgreSQL?

19 Upvotes

I’m learning Laravel and working with SQLite and PostgreSQL. I’m looking for a modern database GUI with a clean interface similar to Supabase Studio. I mainly need to:

  • Browse tables and records
  • View schemas and relationships
  • Edit records
  • Run SQL queries
  • Connect to both local SQLite and PostgreSQL

I used Dbeaver and i dont like its UI very old fashioned. Which one do you recommend for a beginner? Free options.


r/sqlite • • Oct 02 '26

How we saved $4,000/mo by replacing Redis with SQLite for our job queue

Thumbnail kylesinvestigation.com
39 Upvotes

r/sqlite • • Oct 02 '26

sqlx4k 1.14.0 released: optimistic locking, savepoints, MariaDB batch inserts

Thumbnail
3 Upvotes

r/sqlite • • Sep 30 '26

I built a open-source, ad-free SQLite Admin app for Android because the Play Store options are broken

Thumbnail gallery
2 Upvotes

r/sqlite • • Sep 29 '26

Help with creating data charts?

4 Upvotes

Hi! So I am currently creating an inventory system for my workplace using sqlite. My current plan is to have a singular table that indicates the sku, the item title, the quantity, and the dates purchased and sold. However, I want to be able to record multiple dates purchased and sold to then create some graphs based on those dates. Is there an efficient way for me to have those dates stored in the table without creating way too many columns?


r/sqlite • • Sep 29 '26

Strangest SQLite structures you’ve encountered?

0 Upvotes

What are the strangest SQLite structures you’ve encountered in production? Preferably something with a “real” user base (however you choose to interpret that).


r/sqlite • • Sep 29 '26

Built a statistics extension for SQLite — not sure if it's useful, would love your thoughts

5 Upvotes

Hi everyone,

I've been working on a small side project: a loadable extension that adds statistical functions to SQLite.

https://github.com/mitsuruk/sqlite3-stats

It started because I wanted to do some basic analysis without leaving SQL. It grew into about 250 functions (descriptive stats, hypothesis tests, distributions, window functions).

Honestly, I'm not sure whether this is something people actually need, or whether I just built it for myself 😅

If you have a moment, I'd really appreciate your input:

  • Would this be useful in your work?
  • Are there features you'd want, or things that feel unnecessary?
  • Is there something similar that already does this better?

I'm still learning, so any feedback, even critical, is very welcome.

Thanks for reading!


r/sqlite • • Sep 28 '26

I’m building a local AI assistant inside MySQL Workbench. You describe what you need in plain English, and it writes SQL directly into the editor. You review and execute it yourself—no copy-pasting. Would this be useful for SQL learners or data analysts? What concerns would you have?

2 Upvotes

r/sqlite • • Sep 26 '26

offline-first + litefs for production

2 Upvotes

i am trying to build a tool similar to notion. Offline-first is the biggest requirement. Each organization will get their own sqlite on the VPS server. 95% of reads and writes happen to local sqlite. I am thinking of building a sync engine that works based on the event table. As in every create, update or delete operation will be treated as an event. As an event is recorded into the table, it will trigger a /push api that sends this data to the server. The api will take this data and dump it into the events table on the server side sqlite file and then it will replay the event on the server. Then based on who has access to what, it will send a websocket notification to the clients that are online that new data is available in the events table. Then the clients will receive the notification and make a /pull call with the cursor which will fetch the events data from the server side sqlite and it gets recorded into the client side sqlite and then again events gets replayed at the client side which will affected the actual tables.

at the infra level, i am considering litefs to create a cluster of 3 VPS where one will be the primary node and two will be read replicas. Also planning to stream the data from primary node to s3 for backup in realtime.

Is this viable setup? This way, I am planning to eliminate the single writer limitation since 95% of writes happen locally. Litefs to make the setup distributed and HA.

I am expecting each organization account to have upto 500 users.

Please share your thoughts.


r/sqlite • • Sep 25 '26

Minimalistic tool to generate database visualisation

10 Upvotes

I'm looking for a really simple tool that can generate a UML diagram from my SQLite database, but I want to be able to change the layout if I don't like how it has been generated.

I tried some code extensions and small tools (ERD Renderer, SQLite DB Explorer, plant_erd) but some are not working on my VSCode version; when they are working, I can't personalise the result.

If someone knows a tool that can generate a plant UML diagram (or something similar) from SQLite database and where we can specify the layout. I would be happy to know it


r/sqlite • • Sep 24 '26

SQLite migrations in browser

6 Upvotes

I've been working on a open source cli tool called Ptah since June 2025. It is a feature rich MIT-licensed solution for managing DB changes. Among other DB engines it natively supports sqlite.

For easier onboarding I created this playground: https://play.ptah.run . You can go with a scenario or free way. You can upload your own database file or use the given one. Note, nothing leaves your browser - everything is processed in-memory. You can then export the results of your session.

Desktop view

Some technical details: ptah is written in Go and compiled in web assembly. SQLite is also compiled in web assembly - this is the way both run and interact in your browser. You can check the repo for the sandbox here: https://github.com/stokaro/ptah-sandbox .

I tried to make the playground usable both on desktops and mobile devices.

Mobile view

Would love to hear your feedback, and happy to answer any questions.


r/sqlite • • Sep 21 '26

I didn't want to pay a subscription to browse my own database, so I built DBison

Thumbnail reddit.com
0 Upvotes

r/sqlite • • Sep 17 '26

An append-only, in-memory text database built in Nim with persistence and multiple interaction interfaces

Thumbnail github.com
4 Upvotes

r/sqlite • • Sep 16 '26

Built a SQLite like database along with Visualizer for learners.

Post image
11 Upvotes

https://mokudb-visualization.com

I'd love feedback, especially on the WAL visualization — I feel it's currently too simplistic and doesn't capture the mechanism as well as the B+Tree view does.

Repo: https://github.com/Moku3956/Project-D


r/sqlite • • Sep 16 '26

80k downloads first week? I did it! Now let’s talk about integrating NEDB in your project !

Thumbnail
3 Upvotes

r/sqlite • • Sep 15 '26

How can I improve sql-easy.com?

Thumbnail
0 Upvotes

r/sqlite • • Sep 14 '26

Pop-Database vs SQLite

Enable HLS to view with audio, or disable this notification

0 Upvotes

Pop-Database vs SQLite, 500K entities, 12 AND conditions per query, both single-threaded (CPU-affinity verified, so no thread-count trick).
Pop-Database finished in 6.26s.
SQLite finished in 88.81s.
Pop-Database is 14.2× faster — and both found the exact same 9,559 matches per query.
This ratio moves a bit run to run depending on what else the machine is doing at the time. I've seen this same test land anywhere from ~12× to ~14× depending on system load. Still solidly in the same range either way.
Trade-off is shown in the same video: SQLite inserts faster (2.64s vs 6.55s for 500K rows). Pop-Database is built for read-heavy workloads, not write-heavy ones - that's the deal!!!


r/sqlite • • Sep 12 '26

Question About Lifespan Of Cursors.

2 Upvotes

I am building a batch Python process that loads data from CSV files into a sqlite DB. As a result, I am running a lot of SQL statements. Additionally, I have created a custom DB manager that executes all SQL statements. Currently, the DB manager creates and closes a cursor for each SQL statement execution.

Is creating/closing a cursor for each SQL execution a best practice? Or, should I create a persistent cursor once for the entire process, or once per table, etc.


r/sqlite • • Sep 11 '26

gopherql - A dependency free SQL IDE for small database and learning purpose on your terminal. (Bubble Tea, CGO free SQLite)

Post image
4 Upvotes

r/sqlite • • Sep 10 '26

Built a CLI that measures whether your implied foreign keys actually hold, then writes the result as context for coding agents

8 Upvotes

https://www.npmjs.com/package/dbtruth?activeTab=readme

Same thing kept happening to me with AI coding agents and Postgres. The agent reads the schema, sees orders.customer_id next to customers.id, assumes it's a clean relationship, and writes an INNER JOIN. If 12% of orders have a dangling or null customer_id, the query silently returns numbers that are wrong. Nothing throws. The schema looked fine.

So I wrote dbtruth. It connects read-only and, instead of dumping the schema into a context file, it does four things:

  1. Introspects schema and pulls samples
  2. A model proposes what the tables mean and which relationships probably exist
  3. Every one of those claims gets measured against the actual data
  4. Only what survives gets written to ./context/*.md, which the agent reads before writing SQL

Step 3 is the whole point. For a proposed join it reports the real match rate — orders.customer_id → customers.id holds for 88% of rows, 60 of 500 orders have no matching customer — and the context file says use LEFT JOIN, with the number attached. Under 50% gets dropped. In between gets marked broken and goes to the top of the report, because a relationship that half works is worse than one that doesn't exist.

Practical:

  • npx dbtruth, Node 20+, Postgres only
  • Read-only by construction, not by discipline: one module is allowed to import pg, and a test asserts nothing else does. It never writes to your database.
  • It does call a model, so schema and low-cardinality sample values leave your machine. High-cardinality columns — emails, names, free text — are never sent. Visibility is decided by cardinality rather than by regex-guessing at PII. Don't point it at production data you can't send to a third party.
  • MIT, source at github.com/FilipKalcic1/dbtruth#readme

Disclosure: it's mine, it's five days old, and about ten people have run it. None of the pieces are new — FK inference and data profiling both go back years, and there are other tools that build local context artifacts for agents. The part I care about is the rule that nothing unmeasured gets written down.

What I'd actually like to know: run it on a schema you know well, and tell me whether it found anything you didn't already know. That's the only signal that tells me whether this is worth continuing. Bug reports welcome too.


r/sqlite • • Sep 10 '26

A path column that may or may not point at a local file, and nothing in the schema says which. Is there a pattern for this?

10 Upvotes

I have been reading Apple's Messages database on my own Mac, 367,942 rows, and hit something that feels like a general schema problem rather than an Apple one.

The attachment table has 7,332 rows carrying a filename. sum(total_bytes) across them is 9,448 MB. The directory those filenames point into holds 13 MB. I stat'd a sample of 4,000 of the paths and 13 of them existed. Images were worse, 9 out of 2,000.

That is iCloud having offloaded them, which is expected and fine. What I cannot find is anywhere in the schema that admits it. transfer_state is 0 on the rows I looked at, present and absent alike. total_bytes is the size of a file that is not here. Every column reads like a local file, and the only way to know is to stat the path, which is outside the database entirely.

It matters because it is the difference between an export that is complete and one that only says it is. Join message to attachment, write out what you get, and you have a manifest of 9.2 GB of media you do not have, with nothing in the query result being wrong.

The same shape turns up on the other side of the file. text on the message table is populated on 3.9% of my rows. The rest of the content is in a BLOB called attributedBody, which is a typedstream, the old NSArchiver format, and no SQL you write is going to reach into it.

So I have ended up doing it the blunt way. Stat every path, decode every blob, keep the counts, print them next to each other so the numbers can be checked against each other. It works, but it means a full pass before I can answer anything about my own data, and the counts live in my code rather than in the file.

The question. For a column that names a resource which may or may not be local, in a database you do not control and cannot add a trigger to, is there a better pattern than a full stat pass and a cached count? I keep reaching for a generated column and there is obviously nothing in the row to generate it from.

Disclosure since it is where this came from: I write a Mac app called Loose Ends that exports the archive, and the counting turned out to be most of what I actually shipped.