Katkat

Design in-memory database API

OpenAISoftware Engineer · Technical Screen

Last updated

This question evaluates a candidate's ability to design and reason about in-memory data storage, indexing, query planning, and the underlying data structures and algorithms for insert and query operations.

Question

Design and implement an in-memory database that supports:

insert(table, record)

query(table, columns_to_project, conditions=[(column, operator, value)], order_by=(columns, ascending))

Extend the design to explain how indexes would be built and used for faster WHERE and ORDER BY queries.