sql struct and db config