Database Code - temporary memory