sql data
add some comment and improve