Move operation from database to modelproxy.
Update to adapt new model.
Remove some useless codes.
Update example to adapt the new model and database module.