r/sqlite

I've been building a SQL learning platform for the past few months. It's called QueryCase and I'd love honest feedback
▲ 152 r/sqlite+44 crossposts

I've been building a SQL learning platform for the past few months. It's called QueryCase and I'd love honest feedback

I've spent the last few months building something and I'm finally at the point where I want to share it properly rather than just quietly hoping people find it.

The idea came from a frustration I kept seeing (and feeling myself): SQL tutorials teach the syntax fine but there's never a reason to care about the answer. You filter a table called employees, get a result, and nothing happens. Your brain doesn't bother keeping it.

I wanted to try a different approach. QueryCase teaches SQL through detective investigations. You get a briefing from Chief Fox (our mascot), a real database to query, and a mystery to crack. The JOIN matters when a suspect has an alibi. The WHERE clause matters when you're trying to find who entered the building at 22:13. The SQL is the tool for solving something, not the point in itself.

Here's what's actually in it:

  • A structured learning path across 54 cases, going from Recruit through Rookie, Detective, Senior Detective, and Chief Detective. Each rank has drills and a level exam to pass before you progress.
  • Sandbox mode where you can explore real datasets (IMDB movies, Spotify, sports stats, Steam games) and run whatever you want with no pressure and no mystery attached. Just free exploration against actual data.
  • Everything runs in the browser using DuckDB WASM so there's nothing to install.

I'm a solo developer and this is genuinely early days. I'm sharing here because this community is exactly the kind of people I built it for, and I'd rather get honest feedback now than find out later I've built the wrong thing.

What's missing? What would make you actually stick with something like this versus what you've used before?

querycase.com if you want to take a look.

Any feedback appreciated!

u/conor-robertson — 3 days ago
▲ 3 r/sqlite

import as csv to main and one table with custom delimetion?

what is the query to import and empty a csv file with a delimeter of `;` so in a example of:

Li;King;li.king471@protonmail.com;Avenida Central;2046;Cairo;Spain;579856;34;959310341

so it will be imported on the same table per column of li, King, li.king.... , etc

reddit.com
u/Yha_Boiii — 3 days ago
▲ 8 r/sqlite+1 crossposts

Bitemporal time-travel + truth-maintenance-style provenance retraction on Postgres/SQLite (open-source TS graph library)

I just shipped bitemporal provenance for TypeGraph, my open-source graphs-on-SQL library. Three pieces, usable independently but most powerful together:

  • Valid time: when a fact was true in the world (an invoice's effective date, a role grant's window).
  • Recorded/system time: when the system captured that fact (what you knew, as of a commit instant; the SQL:2011 FOR SYSTEM_TIME / Datomic system-time axis).
  • Provenance: why the system still believes a derived fact, and what happens downstream when a source it depended on turns out to be wrong.

Derived facts are the annoying case that surfaces the issue(s) these primitives solve. For example, a Vulnerability node exists because a scanner and a vendor advisory both pointed at it. The graph concluded it; nobody asserted it directly.

ScannerSource ──┐
                ├──▶ Vulnerability (CVE-2026-1234, libvector)
VendorSource  ──┘

So when the scanner turns out to be garbage, you can't treat retracting it as a delete. The vendor might still back that vulnerability. The scanner might have been the only thing propping up a bunch of other facts. You want the graph to sort out which.

What you want: retract a source and it recomputes which derived facts still have grounded support. Retract the vendor too and the vulnerability finally goes non-current, and a "block the deploy" decision sitting on top of it goes with it.

The behavior, then the theory

A fact stays believed while it has at least one justification whose premises are all still supported. Premises bottom out at sources. Retract a source and every justification that leaned on it stops counting; a fact loses currency only once it runs out of surviving justifications.

const provenance = createRetractionCapability(store, {
  source: { kinds: ["ScannerSource", "VendorSource"] },
  justification: { kind: "Justification" },
  fact: { kinds: ["Vulnerability", "DeployDecision"] },
  premiseOf: { kind: "premiseOf" },
  derives: { kind: "derives" },
});

const report = await provenance.retract({ kind: "VendorSource", id: vendorId });
// report.died:        facts that lost all grounded support
// report.survivedVia: facts that still have an alternate justification

This is modeled on truth-maintenance systems. The storage follows the JTMS shape (Doyle 1979, "A Truth Maintenance System"): AND-justifications over premises, sources at the bottom, a fact in the well-founded support set only if some justification has all its premises supported. I use the monotonic, inlist-only fragment, so this is the easy part of Doyle's system; the hard part, non-monotonic belief revision, isn't here. The question retract actually answers, "which facts survive because an alternate justification still holds," is the ATMS question (de Kleer 1986): which combinations of sources hold each fact up. So it's JTMS-shaped storage with an ATMS-flavored query.

Retraction is a normal write, so you get replay for free

Retraction doesn't hard-delete. It recomputes support and flips unsupported facts to non-current, leaving the justification edges in place so you can still see why something used to be believed. Because that write lands on TypeGraph's recorded-time (system-time) substrate, you can replay the belief transition:

const before = await store.recordedNow();
await provenance.retract(badSource);
const after = await store.recordedNow();

await store.asOfRecorded(before).nodes.Vulnerability.getById(id); // believed
await store.asOfRecorded(after).nodes.Vulnerability.getById(id);  // not current

TypeGraph tracks both temporal axes as explicit read lenses, valid time ("when true in the world") and recorded time ("when the database learned it"), and because they're lenses they compose:

store.asOf(validTime).asOfRecorded(recordedTime)

Architecture

No engine-native temporal tables. Postgres needs an extension for system-versioning and SQLite has nothing, so TypeGraph stores history explicitly and reconstructs point-in-time views in the query compiler. That's why one implementation runs on both backends.

Limits

  • Only TypeGraph-managed writes are captured. Raw SQL bypasses it; this isn't a database-level CDC/audit layer.
  • No backfill. Enable history on a fresh graph.
  • Point-in-time reads reconstruct from history relations, so they're slower than current-state reads. It's an audit tool, keep it off hot paths.
  • Per-write overhead runs ~2.5–6x unless you batch writes in one transaction, where it drops to ~1–1.5x.

A naming note

My asOf is valid time, the reverse of SQL:2011 FOR SYSTEM_TIME AS OF and Datomic (d/as-of db t), where a bare as-of is system time. Valid-time reads are the common case here so they took the short name; system time is asOfRecorded.

I'd love to compare with other systems that handle provenance retraction, or truth maintenance generally, modeled directly on ordinary SQL tables instead of a dedicated reasoning engine. There's plenty of JTMS/ATMS literature but not much on mapping it onto relational storage. Pointers welcome.

GitHub: https://github.com/nicia-ai/typegraph Docs: https://typegraph.dev/provenance

Examples: https://typegraph.dev/examples/provenance-retraction/ https://typegraph.dev/examples/bitemporal-time-travel/

u/pdlug — 3 days ago
▲ 36 r/sqlite

SQLiteStudio renamed. New name: Letos.

Letos 4.0.0 released

Letos 4.0.0 is now available. This is the first major release under the new project name - Letos was formerly known as SQLiteStudio - and it is one of the largest releases in the history of the project.

Version 4.0.0 brings a new ERD editor, a move to Qt 6, native ARM64 builds, signed official packages, a refreshed high-DPI-ready interface, major improvements in data browsing and editing, and many smaller workflow improvements across the application.

Project renamed to Letos

SQLiteStudio is now Letos. Together with the new name, the project has moved to its new homepage: letos.org.

The goal remains the same: a free, open-source, cross-platform SQLite database manager focused on practical database work.

New ERD editor

The largest new feature in Letos 4.0.0 is the new ERD editor.

It allows viewing, creating and editing database schema visually as a diagram. Tables, columns and relations can be inspected and manipulated directly on the diagram, making schema design and schema analysis much more convenient than working only from dialogs or SQL text.

reddit.com
u/JrgMyr — 6 days ago
▲ 5 r/sqlite

Sqlite backup

Hi folks,

I am trying to build a startup for sqlite backup infrastructure. Is this okay to go with this or it's overcrowded?? Or if you guys have any thing to say about any pain point you can tell me.

reddit.com
u/ankush2324235 — 6 days ago
▲ 2 r/sqlite+2 crossposts

noslow — open-source middleware that detects slow SQL queries and gives you the fix

github.com
u/Wola9 — 6 days ago
▲ 33 r/sqlite

Where to store my 500k-row SQLite database?

I have a csv file which will be turned to an SQLite database (480k rows). Content: 5 years of real estate transaction statistics. I'll update the database twice a year with fresh data overwrite (I keep it 5 years).

I'll build a one page dashboard that prettyfies all that data with various graphs.

This is a "freemium" feature for very niche users so READ ops count will be limited.

With that context in mind, which simple, easy to use cloud database solution would you recommend? I'm a no coder, and have learned over the past 6 years how databases, backends, frontends work, i just can't write pure code. That's why simple / easy is important.

Thanks for reading.

reddit.com
u/fredkzk — 12 days ago
▲ 9 r/sqlite+4 crossposts

Update Loomabase: I added policy-based sync rejections and transactional audit logs to my Rust SQLite ↔ Postgres sync engine

Hi everyone,
A quick update on Loomabase, the Rust offline-first sync engine I posted about earlier.
After feedback about the security model, I added a server- side authorization and validation layer before CRDT merge.
New pieces:
- SyncAuthorizer hook before merge
- SyncValidator hook before merge
- structured SyncPayload.rejections
- rejected cells are not silently dropped
- rejected cells stay dirty on SQLite so the app can surface or resolve them
- PostgreSQL loomabase_audit_log
- audit rows are written in the same transaction as the sync merge
- tests for authorization denial, validation denial, filtered acknowledgement, and audit logging
- README and SECURITY docs updated with CORS/CSP/sync endpoint hardening notes
The important design choice:
Malformed payloads still fail the whole request before mutation. Valid but unauthorized/business-invalid cells become structured rejections.
That means CRDT conflict resolution stays deterministic, but authorization and business rules can still reject a newer offline write before it wins LWW.
I’d like feedback on this boundary:
Should an offline-first sync engine return structured rejected mutations like this, or should rejected writes be handled outside the sync protocol entirely?

github.com
u/Just_Vugg_PolyMCP — 9 days ago
▲ 1 r/sqlite+1 crossposts

We built a relational database engine from scratch (C++17). It’s now production-ready and powering our next web app.

u/Effective-Hurry436 — 13 days ago