Database index implementation