Explain SQLite code
Paste a SQLite schema or query and Vibe explains each table, constraint and join, and where SQLite behaves differently from other databases.
Up to 1,500 characters (about 60 lines). Your code is sent to Unvibe and Anthropic to write the explanation. Don't paste keys or passwords. Common key formats are refused.
Vibe25 lines selected
Press Explain it for the sample, or paste your own code first.
What this SQLite sample shows
- tables and keys
INTEGER PRIMARY KEYmakesidthe row's own number, filled in when you leave it out: the two customers got 1 and 2.REFERENCES customers(id)says each order belongs to a customer, andUNIQUErefuses a second row with the same email:UNIQUE constraint failed: customers.email.- constraints
CHECK (total >= 0)is tested on every insert and update, so a total of -3 stopped withCHECK constraint failed: total >= 0.DEFAULT (datetime('now'))fills inplaced_atwhen an insert leaves it out, as text in UTC:2026-11-05 18:38:24, the same seconddate -ushowed.- joins and grouping
LEFT JOINkeeps every customer, even one with no orders, andGROUP BY c.idfolds each customer's orders into one row. Run withsqlite3 -header -column, the report showedana@example.comwith 2 orders and 60.5 spent, thensam@example.comwith 1 and 9.99.- indexes
orders_by_customerlets SQLite go straight to one customer's orders.EXPLAIN QUERY PLANforWHERE customer_id = 1saidSEARCH orders USING INDEX orders_by_customer (customer_id=?); forWHERE total > 10, which has no index, it saidSCAN orders, every row.
Good to know
- Run with the sqlite3 command-line tool, SQLite 3.53.4, on a new shop.db. Every error quoted here is that tool's own message.
PRAGMA foreign_keys = ONlasts only for that connection. In a newsqlite3 shop.dbsession,PRAGMA foreign_keysprinted 0 and an order for customer 99, who doesn't exist, was saved. With the pragma on, the same insert stopped withFOREIGN KEY constraint failed.- Column types are loose unless you ask otherwise:
totalisREAL, yet inserting'lots'was stored as text, andtypeof(total)saidtext. The text'7.25'was turned into the number 7.25. In a table declaredSTRICT,'lots'was refused withcannot store TEXT value in REAL column t.total.
Watch out: Running the script a second time doesn't stop at the first error. sqlite3 reported table customers already exists and UNIQUE constraint failed: customers.email but went on, and the orders INSERT ran again: ana now had 4 orders and 121.0 spent. sqlite3 -bail stopped at the first error and left the 3 orders as they were. CREATE TABLE IF NOT EXISTS is not enough on its own: with it, the second run still doubled the orders to 6.
Explain SQLite code beside your editor
Unvibe is a free app for Mac and Windows. In the app there is no pasting: select code in any app and press Control+U (Ctrl+Alt+U on Windows).
Install on Mac
curl -fsSL https://unvibe.site/install.sh | bashPaste into Terminal. Unvibe isn't notarized by Apple yet, so this is the smooth path.
Or download the .dmg · Intel Mac build · SHA-256 checksums
Opening the .dmg the first time
- Open the .dmg and drag Unvibe to Applications.
- Open it once; macOS says it can't verify it. Click Done.

Real screen, macOS 15 - System Settings › Privacy & Security › Open Anyway. Confirm, then enter your Mac password. The button shows for about an hour after you try to open Unvibe.

Real screen, macOS 15
The Terminal line checks the download against the published SHA-256 and Unvibe's self-signed signature before it installs anything. More help with the first open