We propose a two-pha.se algorithm for physical database design. In phase one the algorithm, for each logical query, losesrules to determine characteristics of a physical design (such as indexes) that would be beneficial to the query, and selects a physical design that yields a low cost estimate for that query. In phase two we use a notion of compromase between physical database designs. St,arting from the physical designs selected in phase one, the algorit,hm looks for a compromise physical design that. minimizes the queries’ aggregate frequencyweighted cost. This method is envisioned as a cornerstone in the efficient implementation of a Turing-complete, very-high-level progra.mming language for dat,abase applica.tions, but it is also suitable for more conventional relational and -1NF database management. systems.