A universal relation language interface for the database management system INGRES is presented. The interface allows the user to query the database as i f aU of the data were stored in a single relation. Translation algorithms are used to...
moreA universal relation language interface for the database management system INGRES is presented. The interface allows the user to query the database as i f aU of the data were stored in a single relation. Translation algorithms are used to convert the user query into a query that is appropriate for the stored database. Our implementation o f the interface is discussed. 1. I N T R O D U C T I O N A great deal has been written in recent years about the relational data model and we assume that the reader is familiar with the basic concepts as found in [6,10]. The universal relational system provides a simple view of a relational database for the users. It relieves users of the responsibility for navigation within the physical database. The users only need to apply the appropriate selection criteria and indicate the desired attributes, such as 1rL(aF(U)) , where L is a set of projection attributes and F is a selection condition in conjunctive normal form (CNF), and U is the set of all attributes in the universal relation. Thus, the universal relation interface serves as a bridge between the users and the relational database system. A universal query should be translated to a specialized language that can be accepted by the database management Permission to copy without fee all or part of this matertial is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. © 1991 ACM 089791-382-5/91/0003/0321 $1.50 system (DBMS), then the DBMS, based on the query, generates the relation containing the required attributes as a desired result. Under the universal relation assumption [ 1 ], a universal relation defines a complete join dependency, and can be viewed as a database scheme. The existence of such a join dependency indicates that the universal relation in the user view can be generated by joining the system relations, and the produced tuples are valid because of the lossless property. In practice, it is infeasible to expect that the universal relation is required to produce the desired results, because the universal query seems potentially to be localized in part of the database, and it is important to make sure the system will produce the correct information (either the desired result or a message to indicate the join is lossy). Thus, the universal relation interface should ensure a lossless join sequence J (where J = R, lxt R 2 ... Ixl Rk). Two basic approaches have appeared in the literature to fred an appropriate connection (join sequence). The first approach utilizes the topology of the hypergraph [2,3]. Since there is a natural correspondence between a database scheme and a hypergraph, one can use the hypergraph model to simplify the discussion of testing the lossless property for a subhypergraph (there is a correspondence between a subhypergraph and a join sequence). Fagin [2] has shown that if a database scheme is y-acyclic (i.e., the hypergraph corresponding to this database scheme is yacyclic), then any arbitrary connected subhypergraph defines an embedded join dependency. Owrang and Miller [9] introduced an algorithm to find a join sequence for a source query and produce a lossless join if the hypergraph is 'y-acyclic. Unfortunately, it is not always feasible for the