← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Design and implement an in-memory database that supports basic SQL-like operations. The database should store tables as dictionaries where each table name maps to a tuple of (column_list, list_of_row_lists). You need to support CREATE TABLE, INSERT INTO, and SELECT queries with optional WHERE clauses and ORDER BY. The WHERE clause may contain multiple conditions combined with AND, each expressed as (column, operator, value) tuples. The SELECT query should return the list of row indices that match the query conditions. Your implementation should parse SQL strings, maintain indexes for efficient lookups, and execute queries using inverted indexes for equality conditions when possible.