rewrite source code

make source code easier to read.
shorten insert/update
fix bug db prefix

fix always db prefix, add check table name exists. (table.field)