LanceDB Vector Database Management in VS Code
Overview
Section titled “Overview”LanceDB is an open-source, embedded (in-process) vector database built on the Lance columnar data format. Highlights include:
- In-process, no server: A database is just a directory of Lance datasets on disk - no service to run, no credentials
- Built on the Lance format: A fast, versioned columnar format designed for ML and vector workloads
- Strict schema: Each table declares its columns (an Arrow schema), including the vector column (a fixed-size float list)
- SQL filtering: Filter searches and browses with SQL expressions (evaluated by DataFusion)
- Native performance: A prebuilt platform binary, downloaded on first connect
LanceDB is commonly used for local-first semantic search, retrieval-augmented generation (RAG), and embedding-heavy applications that want a database file rather than a server.
Connecting
Section titled “Connecting”To connect to LanceDB in DBCode:
- Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
- Add a New Connection: Click on the “Add Connection” icon.
- Complete the connection form: Select LanceDB as the database type and choose the Database Directory - the folder containing your Lance datasets. There is no host, port, or credential.
- Connect: Click save. The first connection downloads the platform binary for your OS.
- Start exploring: Browse your tables, inspect the schema, and run vector searches.
For detailed instructions, refer to the Connect article.
LanceDB Features in DBCode
Section titled “LanceDB Features in DBCode”DBCode brings the same browse-and-search workflow you already use for SQL and document databases to LanceDB:
- Table browsing: Navigate tables and inspect the declared Arrow schema (id, vector, and scalar columns)
- Vector cell rendering: Vector columns are summarised inline (e.g.
[float32×768]) and expandable on click - Vector search: Run nearest-neighbour searches with top-K, SQL filters, and a
_scorecolumn (Lance returns a distance, so lower is closer) - Editing: Edit scalar columns inline and delete rows (the id and vector are read-only)
- Search by text: Configure an Ollama model or DBCode AI to embed your query text on the fly (LanceDB has no built-in embedding)
- JS shell editor: Drop into a JavaScript editor and run the LanceDB client directly (
client.search('table', { vector, limit, where }),client.browse(...),table('name')...)
By using LanceDB with DBCode, you get a unified workspace for traditional and vector data without leaving VS Code.
For more information about LanceDB, check out LanceDB.