Design: Database Indexing System
Design focuses on indexing mechanisms within a database system. Query parsing, transaction management, and full database engine design are out of scope.
Functional Requirements
FR1: Support fast lookup of records by indexed columns
FR2: Allow multiple types of indexes (e.g., B-tree, hash)
FR3: Support efficient insert, update, and delete operations with index maintenance
FR4: Enable queries to use indexes to reduce search time
FR5: Provide ability to create and drop indexes dynamically
FR6: Handle large datasets with millions of records
FR7: Support composite (multi-column) indexes
Non-Functional Requirements
NFR1: Index lookup latency should be under 10ms for 1 million records
NFR2: Index maintenance should not degrade write throughput by more than 20%
NFR3: System availability target is 99.9% uptime
NFR4: Indexes should not consume more than 30% additional storage compared to raw data
NFR5: Support concurrent read and write operations without blocking