DB: moved sql commands to .cpp