Database Read/Write framework