resorted database