Use id instead of name to define database env vars

Allow database name to change without affecting the environment variables