Moved db-related things to sql/ folder