Improved memory database support