New database structure implemented by Bo-cheng Jan

This is new database structure implemented by Bo-cheng Jan. See [this](https://groups.google.com/d/msg/chewing-devel/W1Qy3MJltIM/FRz5cn7ZC-0J) for more information.