add database read/write test