better indexeddb table structure and implementation