client database structure working