1. In a digital computer system employing a data base system for accessing stored data, means for transforming logical query data representing a query to be performed by said data base system into query code executable by said data base system comprising: (1) implementation-dependent analysis means for receiving certain said logical query data representing a said query and responding thereto by providing a cost data specifying the cost of an operation in said data base system specified by certain said logical query data and implementation-dependent portions of said query code required to perform said specified operation; and (2) implementation-independent transformation means for modifying said logical query data in response to said cost data and producing said executable query code containing said implementation-dependent portions from said analysis means.