Use joi to parse db type and connection properties.