In recent years, research in relational design theory and in query optimization has established a firm ground for designing well-structured logical and physical database schemes. However, the design process prequires mastering a considerable amount of theoretical results. Furthermore, even for the initiated database designer, many of the known algorithms for logical design do not provide constructive guidelines for generating a database scheme that would prevent update anomalies and data inconsistencies. Nor do the algorithms and evaluation methods for file structures and query processing provide constructive physical design rules. We propose an expert tool that would make knowledge in relational design theory and query optimization automatically and transparently available to the database designer. This tool is a system with an interactive, graphical interface that uses examples to guide the designer through several phases of logical and physical database design. Logical design is based on example relations, and physical design on example queries. The example relations are automatically generated by the system. They contain sample data and satisfy the data dependencies that the designer specifies with the assistance of the expert tool. The example queries and their expected frequency are specified by the designer, using graphically displayed skeleton queries. The system generates a physical design scheme that optimizes the mix of queries expected by the designer, and computes a performance forecast. Both example relations and example queries can be modified by the designer, until the expert tool generates a satisfactory design