Reference implementation for database indexing