add primary database support