2014-07-28 : rewrite dbswitch and updateallbook