Updated database interaction