sort in database

sort the date and the address by using the sqlite database