Skip to content

LanceDB Vector Database Management in VS Code

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.

To connect to LanceDB in DBCode:

  1. Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
  2. Add a New Connection: Click on the “Add Connection” icon.
  3. 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.
  4. Connect: Click save. The first connection downloads the platform binary for your OS.
  5. Start exploring: Browse your tables, inspect the schema, and run vector searches.

For detailed instructions, refer to the Connect article.

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 _score column (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.