improve database operation

add feature with select order by