Finally 80% Done with the database part

Signed-off-by: Hui Zheng <hzheng@wpi.edu>