Database: new way to save data to database

Signed-off-by: fjling <jialingfu@hotmail.com>