add database config and some sample code,sql changed.