Database logic update