Selection out of several databases according to workpiece or conditions