Updated database structure SQL