Retrieves or creates a TypeRegistry for the specified database. This method is internal to the driver.