Towards two-dimensional indexing for constraint databases