Skip to main content
As described in the Namespaces and Catalog Model section, namespaces are LanceDB’s way of generalizing catalog specs, providing developers a clean way to manage hierarchical organization of tables in the catalog. The SDKs treat namespace as a path and can use it for table resolution when you use LanceDB outside the root namespace. As your table organization needs grow over time and your projects become more complex, you can use namespaces to organize your tables in a way that reflects your business domains, teams, or environments.

Table operations with namespace paths

Let’s imagine a scenario where your table management needs have evolved, and you now have the following multi-level structure to organize your tables outside the root namespace.
(root)
└── prod
    └── search
        └── users   (table)
Below, we show how you would express table operations within that namespace. Each item in the namespace list (["prod", "search"]) represents a level in the namespace hierarchy, and the table name is specified when you create, open, or drop it.
Namespaces are optional parameters in LanceDB, and most basic use cases do not require you to specify them. An empty namespace ([]), which is the default, means “root namespace”, and the data will be stored in the data/ directory.

Namespace management APIs

You can open/create/drop tables inside a namespace path (like ["prod", "search"]). The Python and Rust SDKs expose namespace lifecycle operations directly. In Python, use lancedb.connect_namespace(...) when calling namespace lifecycle methods such as create_namespace, list_namespaces, describe_namespace, and drop_namespace.
In TypeScript, namespace lifecycle management is not on Connection, so namespaces usually need to be created through another admin surface (for example REST/admin tooling) before use.