Database / LanceDB Interview questions
Define a table in LanceDB?
A table in LanceDB is the core unit of data storage — a columnar collection of rows sharing a defined schema, conceptually similar to a table in a relational database, except its columns commonly include a fixed-size vector column alongside ordinary scalar columns like strings or numbers.
import lancedb db = lancedb.connect("./my_lancedb") table = db.create_table( "documents", data=[{"text": "hello world", "vector": [0.1, 0.2, 0.3]}] )
Each table is backed by one or more Lance-format data files on disk (or in object storage), and every write to a table — adding rows, updating them, deleting them, or changing the schema — creates a new version of that table rather than mutating existing data files in place.
Tables support both a strongly-typed schema (defined via Arrow types or a Pydantic model in Python) and flexible ingestion from common formats like a list of dictionaries or a Pandas DataFrame, so the schema can be inferred automatically from the first batch of data if one isn't explicitly declared upfront.
More Related questions...