complete the project

1. implement functions of datase manager
2. write corresponding documentation
3. delete useless tempfiles