update and fix bug

1. refractor database logic
2. modify activity xml

Signed-off-by: Yifan <zhu_yifan@me.com>