database sql and dump

Signed-off-by: Andrew <zlqxccxuy@gmail.com>