.db File Extension
.db file may contain, how to identify and open it safely, how Poly supports it, and when to export the data. File extension details for .db
Storage Only| File type | Database file, often SQLite or application-specific |
|---|---|
| MIME type | |
| Encoding | Binary; structure depends on the database engine or application |
| Operating systems | Windows, macOS, Linux, iOS, Android |
| Opens with | SQLite command-line shell, DB Browser for SQLite, Originating application |
| Poly support | Yes. Poly stores, syncs, shares, versions, and downloads DB files. |
| Indexed by Poly | Name only. Database schemas, tables, rows, and embedded text are not indexed. |
| Preview in Poly | No. Download the file and open it with the matching database software. |
| Poly agent | No. The Poly agent cannot query or read the database contents. |
What kind of file is a .db?
A .db file contains data organized by a database engine or application. The suffix is generic, so it does not define one universal format. Many are SQLite 3 databases and can use the registered application/vnd.sqlite3 MIME type. Others use unrelated layouts.
Check the contents before choosing an app. A SQLite 3 main database starts with these 16 bytes, which spell SQLite format 3 followed by a zero byte:1
53 51 4C 69 74 65 20 66 6F 72 6D 61 74 20 33 00
The Windows filename Thumbs.db is different. Windows XP used it as a per-folder thumbnail cache.2 A file without the SQLite header may require the application that created it.
records.db to records.sqlite does not convert or identify the database. SQLite itself imposes no filename-extension requirement.3How do I open a .db on my computer?
If the header identifies SQLite, use the official sqlite3 shell or DB Browser for SQLite on Windows, macOS, or Linux. Start with a copy of an unfamiliar database and open it read-only:
sqlite3 -readonly records.db
Use .tables to list tables, .schema to inspect definitions, and PRAGMA quick_check; to check consistency.4
If SQLite reports that the file is not a database, do not assume it is damaged. Look for the creating application's name or documentation for the device or program that produced it. On mobile devices, .db files are often application data rather than user-facing documents.
Poly support for .db
Poly stores, syncs, shares, versions, and downloads .db files, and you can find them by filename and ordinary file properties. Poly does not infer SQLite from the .db suffix alone because the extension is ambiguous.
There is no in-app database browser. Poly does not index schemas, tables, rows, or embedded text, and the Poly agent cannot query the contents. Supply the application/vnd.sqlite3 MIME type when a workflow already knows the file is SQLite, then download it for inspection.
History of .db
.db is a descriptive abbreviation for “database,” not an extension introduced by one standard or vendor. Its meaning therefore follows the creating application.
SQLite was first released in 2000, and SQLite 3 introduced its current incompatible on-disk generation on June 18, 2004.5 SQLite does not require .db, but IANA included it alongside .sqlite and .sqlite3 when registering application/vnd.sqlite3 in 2018.6 Microsoft also used the exact filename Thumbs.db for folder thumbnail caches in Windows XP, illustrating why the suffix alone is not a reliable format test.2
Working with .db and alternatives
For a SQLite database, choose an export based on what must survive:
| Output | Best for | What may be lost |
|---|---|---|
| SQL dump | Rebuilding schema and rows | Engine-specific runtime state |
| CSV | One table or query result | Relationships, types, indexes, triggers, and BLOB fidelity |
| JSON | Application or API interchange | No universal mapping for a relational schema |
The SQLite shell's .dump command creates a text representation of schema and data.7 CSV results are easier to preview and search in Poly, but keep the original when you need constraints or relationships.
Do not copy a live SQLite main file casually. Recent committed changes can reside in a companion -wal file. Use SQLite's backup facilities or a database-aware export to create a consistent standalone copy.1
Footnotes
- SQLite Project. Database File Format. The specification defines the header, pages, and transaction side files. ↩ ↩2
- Microsoft. IThumbnailCache Interface. Microsoft documents the per-folder
Thumbs.dbcache used by Windows XP. ↩ ↩2 - SQLite Project. SQLite as an Application File Format. SQLite allows any suffix and provides an Application ID for finer identification. ↩
- SQLite Project. Defense Against the Dark Arts. The guidance covers untrusted database files, defensive configuration, and integrity checks. ↩ ↩2
- SQLite Project. SQLite Release 3.0.0. The release notes date the SQLite 3 format and summarize its major changes. ↩
- Internet Assigned Numbers Authority. application/vnd.sqlite3 Media Type Registration. It lists
.db,.sqlite, and.sqlite3and documents the 2018 registration. ↩ - SQLite Project. Command-Line Shell for SQLite. The manual documents database inspection, CSV output, and the
.dumpcommand. ↩