Paper accepted at SIGMOD