A compact representation of graph databases