Academia.eduAcademia.edu
Journal of Database Administration DBDesigner: A Tool for Object-Oriented Database Applications Shuguang Hong Georgia State University Joshua Duhl and Craig Harris Ontos, Inc. DBDesigner is a graphical front end tool for ONTOS, a commercial object-oriented database system. Through its graphical user interface, DBDesigner allows an application developer to design, browse, and modify a database schema, and to generate C++ header files from the schema. For the purpose of testing and prototyping, DBDesigner permits the user to create, modify, and delete objects in a database. DBDesigner can be a stand alone tool for the design of object-oriented databases or as a library module that can be linked into an application program. The unique approach of DBDesigner is to integrate these activities into a working environment for the development of object-oriented database applications. (a) Schema and object management. A mechanism must be developed to help the user store, retrieve, and modify a large number of classes, objects, and relationships. (b) Data representation. An appropriate visual representation for the database schema and objects must be selected carefully to match the needs of the user. (c) Prototyping. Interactively, the user should be able to design and modify a database schema and to test the schema by creating and modifying objects. In addition, programming code should be generated from the schema that can be directly incorporated into application programs. (d) Database query. Query capability must be provided to the user for extracting information from a database in an easy and natural manner. (e) Customization. The system can be tailored to the needs of different users with respect to methodology, environment, and design goals (Reiner, 1988). For example, the user should be able to customize the visual display of the Introduction Because of the large scale and complex structures of applications built on the top of object-oriented databases ( OODBs ), the user, an application developer, not only have to manage the database schema and a large number of objects generated by application programs, but also need routinely to browse, modify, test, and debug the database. To help the user to manage the complexity and to improve the productivity, computer-aided tools for the development of OODB applications are required. The design and implementation of such a tool must consider the following major issues. Manuscript originally appeared in “Emerging Information Technologies for Competitive Advantage and Economic Development,” Proceedings of the 1992 Information Resources Management Association International Conference. Summer 1992 3 Journal of Database Administration Figure 1: Application Development Environment screen to their preference. DBDesigner is a graphical tool for the development of OODB applications based on ONTOS, a commercial objectoriented database system(Andrews, Harris and Sinkel, 1989; ONTOS, 1989, 1990). DBDesigner provides the user with a visual representation of database schema and objects. A working environment is created that allows the user to design, browse, modify, and test database schema and objects and to generate C++ header files from the database. The tool also can be used as a library module and linked into an application program. Figure 1 shows a typical application development cycle using DBDesigner. In the rest of the paper, the section Related Work provides a short survey about related work.Then, the graphical user interface of DBDesigner is introduced, and followed by a section devoted to the design and implementation issues. Lastly, the conclusion is given. To aid discussion, the terminology used in this paper is compared to other terms that are commonly referred to in other literature. Class: Property: Type Attribute, Instance Variable Procedure: Operation, Method Object: Class Hierarchy: Instance, Instance Object Generalization/Specialization, IS-A, or Supertype ( -Class) / Sub-type (-Class ) Relationship Related Work Research prototypes based on graphical user interface for database systems have been reported in recent years, such as ADAM (Ellis and Demurjian, 1991), OdeView (Agrawal et al., 1990), RIDL(Troger, 1989), SNAP (Bryce and Hull, 1986), SIG (Maier et al, 1986) , Gambit (Braegger et al., 1985) , ISIS (Goldman, et al, 1985) , DBDT (Maryanski, et al., 1985) , LID (Fogg, 1984) , SKI (King and Melville, 1984), and DDEW (Reiner, 1984). Since these systems were 4 Vol. 3, No. 3 built mainly for research purpose, each of these prototypes focused on one or a few of the major design issues listed in Section 1. For example, LID concentrated on a graphical navigation methodology for database browsing. Although SNAP provided utilities for database browsing, schema designing, and simple query specification, it did not support prototyping and code generation. By contrast, SIG and OdeView permitted the user to construct a graphical display for databases, but other issues have been paid a little attention. ADAM allowed the user to design classes and relationships, and to specify database update propagations for which C++ code can be generated. But, database browsing and prototyping was not supported by ADAM. As a commercial product for solving real world problems, DBDesigner has addressed all major issues, such as schema design and modification, database browsing and prototyping, code generation, and tool customization. The assumption of the user type is other issue that differentiates DBDesigner from most of the prototypes discussed above. For example, tools such as (Agrawal, et al., 1990; Troger, 1989; Bryce and Hull, 1986; Braegger, et al., 1985; Goldman, 1985; Fogg, 1984) assumed that the users are naive users. Based on such an assumption, those tools have emphasized “ease of use.” Because the users of DBDesigner are application developers, the design of DBDesigner must offer and maintain a balance between ease of use features and the degree of sophistication. DBDesigner permits the user to customize some screen layouts. But, unlike those systems that are for constructing graphical user interfaces, such as ET++ (Weinand, et al., 1988), InterViews (Linton, et al., 1989), MERCY (Stary and Messner, 1991) , Ingrid (Guimaraes, 1991) , DBDesigner is a graphical database design tool. Hence, it has a different set of objectives and does not provide the similar capabilities as that of those systems. Tools have been developed for aiding object-oriented programming, such as ObjectWorks (1990), GraphTrace (Kleyn and Gingrich, 1988), and OOPE (Borras, et al., 1990). Those tools provided object-oriented programming Journal of Database Administration Figure 2: User Interface environments with utilities for navigating data structures, browsing function invocations, incremental compilation, and debugging. But, these systems did not provide database functionality. DBDesigner is a tool for database applications and allows the user to start, commit, or rollback transactions, and to construct database queries. User Interface Figure 2 shows a typical screen layout of DBDesigner. The start up command window is at the top left corner of the screen and contains commands for initiating a browsing session, saving database modification or restore database to its previous state, printing help message, etc. A schema diagram window below the start up window displays a class hierarchy. A type window next to the schema diagram window on the right lists a class definition. Below the type window, an object window contains the values of an object. A display options panel is shown next to the object window on the left. A browsing session begins with a selected subschema presented in a schema diagram window. The user can explore the database by directly manipulating the contents in a window, so called object-oriented user interface style. The manipulation can be: • Browsing class hierarchies, class definitions, objects of a class, or values of an object, • Creating classes or modifying class definitions, • Creating, modifying, or deleting objects, or • Generating C++ header files for selected classes. After browsing the class hierarchy as drawn in Figure 2, for example, the user selects four classes of interest (highlighted) from the hierarchy and wants to examine those classes. DBDesigner responds to this request by popping up four windows, retrieving those classes from the database, and displaying their definitions in those windows, respectively. Design and Implementation Integrated Working Environment Approach The common activities of OODB programming involves schema design, browsing, editing, and database testing and debugging ( prototyping ). Instead of designing a Summer 1992 5 Journal of Database Administration separate tool for each activity, we decided to integrate these activities in a working environment. As pointed out by (Zlodnik and Maier, 1990), there is little agreement on the best ways to address the issues in the development of graphical tools for databases. But compared to other approach, our approach has the following advantages. (1) (2) The user can perform all activities within a single system. Although each of those activities has its own requirements, they are logically interrelated. For instance, the user modifies a class definition only after that class is browsed and examined. Also, when satisfied with the definition of a schema, the user may want to test the schema by creating instance objects. Furthermore, those activities do not conflict each other. However, if those activities are separated into different tools, the user would have to switch frequently among those tools, which would be inefficient and annoying. Coherent and uniform user interface style can be enforced easily across all system components. That is, the same screen layout and usercomputer interaction style is used to communicate with the user to perform various activities. (3) Database Navigation Model An OODB usually contains a large number of classes, relationships, and objects. A navigational guidance is required to help the user locate information of interest easily and quickly. Relationship navigation has been used extensively as the means to guide database browsing. But, there are several kinds of relationships commonly accepted, such as generalization/specialization ( IS-A or class hierarchy ), classification ( is-instance-of ), association, etc. Because the IS-A relationship is an important and popular concept of object-oriented paradigm, we have decided to build the database navigation model around the IS-A relationships, i.e., class hierarchies. In DBDesigner, a browsing session begins with the display of a class hierarchy. The user can then explore the database by expanding or shrinking the class hierarchy, displaying class definitions or object values, or navigating in the database via various relationships from a class to other class, from a class to objects, from an object Figure 3: Class Hierarchy Query 6 Vol. 3, No. 3 The learning and training time required of the user is reduced. The user could begin with learning simple functionality and gradually progress to advanced features. After knowing how to browse the definition of a class in a window, for instance, the user could advance to the class modification by learning a new command in the same window. That is, accumulated learning is encouraged. Journal of Database Administration to other object, or from an object to a class by a simple selection and a mouse click. To help the user manage a large number of classes and objects, DBDesigner has used the Directory facility of ONTOS. With the help of DBDesigner, the user organizes classes and objects into a directory hierarchy. This facility also allows the user to change freely from a director to other directory and to set the database browsing scope and range. Database Query Construction Direct screen manipulation has been adopted as a way to construct queries. As discussed in the previous subsection, the navigation via relationships is a simple database query. Those queries retrieve classes or objects based on predetermined conditions. For example, the query, Select all user-defined subclasses of the class Object in depth of 5 levels. Internally, DBDesigner provides two major means to construct queries from the user’s actions. The first method is used mainly for browsing class hierarchies. Abstractly, a class hierarchy is a special kind of graph, lattice, in which nodes are classes and arcs are inheritance relationships. Queries on class hierarchies are specified in terms of manipulations that add, prune, and traverse the nodes and arcs of a graph as well as to partition a graph into multiple graphs or to merge graphs into a single graph2, see (Hong, 1990) for detailed discussion. For example, the query, Select all user-defined or built-in subclasses of the class Object in depth of 3 levels, Select the advisor of student John Smith is formed by highlighting the value of Advisor field of the student object whose name is John Smith, and clicking a mouse button twice. A complicated query condition can be specified in terms of display options. Figure 3 shows an option panel and a schema diagram window. The class hierarchy in the window is specified by the conditions set in the option panel that requests to display the user-defined subclasses of OBJECT down to 5 inheritance levels1. DBDesigner interprets the options as the query, is constructed as the union of two graphs; one contains all user-defined classes; and another includes built-in classes. Followed the similar direction as OdeView (Agrawal, 1990), the second method to construct queries is to implement operations that is similar to the projection and restriction operators of the relational algebra (Codd, 1970). The projection operation is used to select a portion of class definition or object values to display. Figure 4 shows the definition of BOOK and an option panel. The display options request to retrieve public and private definition of BOOK. Currently, a set of predefined projections has been Figure 4: Projection on Class Definition Summer 1992 7 Journal of Database Administration Figure 5: Object Creation Figure 6: Object Value Modification implemented. Those projections are divided into two categories, content and scope projections; the content projection partitions the contents of a class or object into properties, constructors, and procedures; and the scope projection divides the contents into inherited, local, public, protected, and private groups. Those projections can be combined using the AND Boolean logic to form complex projection expressions. The example in Figure 4 is translated into the query: Projection Book on public and private properties, procedures, and constructors. The restriction operation is used to select which 8 Vol. 3, No. 3 object(s) should be manipulated. In the current version of DBDesigner, the restriction operation is performed only within a single class. That is, objects of a same class are selected. For example, select a group of manager objects. We have realized that this is a limited form of restriction. A plan has been made to remove the limitation in the next version of DBDesigner. Schema Design and Modification New classes can be created interactively through DBDesigner. The user can select superclasses first, and then form a creation method ( constructor in C++ ) for the new class. The newly created class is added to a displayed class hierarchy, automatically. Journal of Database Administration The properties of an existing class, except built-in classes, can be modified. By default, the definition of a displayed class is read only to prevent any accident modification. The user must explicitly switch to the write model in order to make any change. After a class is altered, the user can either save or discard the changes. A very useful feature of DBDesigner is to propagate the change made in a superclass to all its subclasses. After the user requests the transaction commit, all changes become permanent in the database. Database Prototyping DBDesigner allows the user to create, modify, and delete objects. To create an object, an object template is prompted to the user for entering the object values. After the given values are validated, a new object is created. Figure 5 shows the template for creating a MANAGER object. The Execute command in the window issues the object creation request. Note that the entered values can be reused, with modification if necessary, for creating the next new object. This is a very efficient way to reduce repeated data entry. In a manner similar to the modification of classes, the values of an object can be modified as the user wants. Figure 6 displays an EMPLOYEE object, John Smith, in a window in which this object can be browsed and modified. Data Representation Because our users are application developers, we have combined the diagram approach and the forms approach (Bryce and Hull, 1986; Rowe and Shoens, 1982;; Shu, et al., 1983) as the interface metaphors. Diagrams are used to draw relationships and forms are used to display classes and objects in a C++ like syntax that matches with the programming language, C++, used to develop applications on the top of ONTOS database. Foreseeing the needs of displaying information in different programming language syntaxes beside of C++, we have separated the text syntax seen by the user from that which is used to store the schema and objects in a database. The system is responsible for converting information into the desired syntactic format between the user interface and the database. For example, ONTOS stores the declaration of a procedure in a Procedure object that uses separate structures for storing the procedure name, returned type, and the names, types, default values of arguments, etc. DBDesigner converts the procedure information into C++ syntax back and forth depending on the user’s request that is either data Figure 7: Different Class Hierarchy Layout Summer 1992 9 Journal of Database Administration retrieval or update. A property value of an object can be a reference to other object. To display the values of an object, all object references of that object are replaced by the names of the referenced objects3. We also define display formats for properties that have complex structures, such as dictionary, set, list, and array. For instance, assume that in an Employee object the Previous-Employers property is of type Dictionary that contains ordered pairs of Company and Address objects. This property value is displayed as a set of ordered pairs of Company and Address names. By selecting an object name or object names, the user can browse the actual object(s). Screen Layout Design To be able to display as much information as possible in the limited screen space without resulting in a crowded screen layout. we adopted three techniques to achieve our goal. One is to allow the user to close a window as an icon when the information contained in that window is not currently needed. The second technique is to following the object-oriented design style. Each window is associated with a set of operations that are applicable to the contents displayed in that window. The class window in Figure 4 is such an example. Instead of separating various functionality into individual tools ( windows ), this window is associated with operations for browsing and modifying the class definition, creating and browsing objects, and navigating other classes or objects via different relationships. This technique has not only reduced the number of windows, but also enhanced the object-oriented design style. The third technique is to divide windows into permanent and transient windows and maintain only a few permanent windows. A permanent window may remain on the screen until either the user closes it or a browsing session is terminated. The schema diagram windows and class definition windows are permanent windows. A transient window stays for a short period and is dependent on a permanent window. For example, the display option panel of a class definition window in Figure 4 is a transient window. It pops up when the user needs to form a query on the contents of a class, and pops down after the query is processed. 4.8 Customization The design of DBDesigner has taken customization into consideration. The first form of customization is to permit the user to customize the graphical representations of class hierarchies. Figure 7 shows three different representation of a same class hierarchy in which the orientation of the hierarchy and the shapes of the classes can be selected. The second form of customization is to provide a simple programming interface so that DBDesigner can be linked to an application program. This interface consists of functions for initializing DBDesigner, starting a DBDesigner session, 10 Vol. 3, No. 3 closing a DBDesigner session, and terminating DBDesigner. The stand along version of DBDesigner in fact is a simple application program that starts DBDesigner only once. In general, the application program can control when, how, and how often to start the DBDesigner. Conclusion DBDesigner is a commercial tool to support OODB programming. It provides a visual representation for database schemas. It creates an integrated working environment that allows the user to design and modify a database schema and to browse, and test the database. It also generate C++ header files from the database. Several limitations of DBDesigner have been noted. One is lack of the capability for allowing the user to specify queries that have complex conditions. Also, it has no utilities to support schema evolution, versioning, and database administration. Since the first release of this product, plans have been made to study those limitations and to improve the functionality of the product. ACKNOWLEDGMENTS We would like to thank the engineering staff of Ontos for their valuable comments and suggestions. Special thanks to Tim Andrews, Bob Martin, Paul Martel, Lisa Molesworth, Jerry Thomas, and Wes Wilson for their contributions to the design, implementation, and testing of the DBDesigner. References Agrawal, R., Gehani, N.H., and Srinivasan, J, “OdeView: The Graphical Interface to Ode”, Proc. of ACM SIGMOD, May, 1990, pp.34-43. Andrews, T., Harris, C., and Sinkel, K., “The ONTOS Object Database,” Ontologic, Inc., 1989. Byrce, D. and Hull, R., “SNAP: A Graphics-Based Schema Manager”, Proc. of IEEE Int’l Conf. on Data Engineering, Feb. 1986, pp. 151-164. Braegger, R.P., et al. “Gambit: An Interactive Database Design Tool for Data Structures, Integrity Constraints, and Transactions”, IEEE Trans. on Software Engineering, Vol. SE-11, No. 7, July 1985, pp. 574-583. Chan, E.R.R and Lochovsky, F.H., “A Graphical Database Design Aid Using the Entity-Relationship Model,” Proc. of the Intl. Conf. on the EntityRelationship Approach to Systems Analysis and Design, 1979, pp. 303-318. Chen, P. P, “The Entity-Relationship Model — Toward a Unified View of Data,” ACM Trans. on Database Systems, 1, 1, 1976, pp. 9-36. Stary, C. and Messner, K., “MERCY - High Level Control for Declarative User Interface Specification,” Proceedings of TOOLS 5, Aug. 1991, pp.281-289. Codd, E.F., “A Relational Model of Data for Large Shared Data Banks,”Communication of ACM, Vol. 13, No. 6, June, 1970, pp. Borras, P., Doucet, A., and Pfeffer, P., “Using an OODBMS to Implement a Programming Environment: Experience and Lessons,” Proceedings of ECOOP/OOPSLA’90: Workshop on Object-Oriented Program Develpment Enviornments., Oct. 1990. Journal of Database Administration ONTOS Reference Manual, Ontologic, Inc. ( 1989, 1990 ) Ellis, H.J. and Demurjian, S.A., “ADAM: A Graphical, Object-Oriented Database-Design Tool and Code Generator,” in Proceedings of ACM Computer Science Conference, 1991. ONTOS Database Designer Reference Manual, Ontologic, Inc. ( 1990 ). Feldman, P. “A Diagrammer For The Automatic Production of Entity Type Models,” Proc. of the Third British National Conf. on Databases, July 1984, pp.57-70. Reiner, D. S., et al, “The Database Design and Evaluation Workbench (DDEW ) Project at CCA,” IEEE Database Engineering, Vol. 7, No. 4, Dec. 1984, pp. 10-25. Fogg, D., “Lessons from `Living in a Database’ Graphical Query Interface,” Proc. of ACM SIGMOD, June 1984, pp. 100-106. Reiner, D. S., “Automated Support for Database Design,” Lotus Development Corporation, 1988. Goldman, K.J. et al., “ISIS: Interface for a Semantic Information System”, Proc. of ACM-SIGMOD, May 1985, pp. 328-342. Rowe, L. A. and Shoens, K. A., “A Form Application Development System,” Proc. of ACM SIGMOD, June 1982, pp. 28-38. Guimaraes, N., Carrico, L., and Antunes, P., “Ingrid - An Object Oriented Interface Builder,” Proceedings of TOOLS 5, Aug. 1991, pp. 291-300. Shu, N. C., Wong H. K. T. and Lum, V. Y., “Forms Approach to Requirements Specification for Database Design,” Proc. of Annual Meeting of SIGMOD, Vol. 13, May 1983, pp. 161-172. Hong, S., “The Design and Implementation of ONTOS Schema Designer”, Ontologic, Inc., 1990. Hong, S., and Maryanski, F., “Using A Meta Model to Represent ObjectOriented Data Models”, in Proc. of IEEE Int’l Conf. on Data Engineering, Feb. 1990, pp. 11-19. Hong, S., and Maryanski, F., “Database Design Tool Generation vis Software Reusability,” Proc. of IEEE Int. Computer Software & Applications Conf., Oct. 1988, pp. 361-368. Kleyn, M. and Gingrich, P. C., “GraphTrace - Understanding ObjectOriented Systems Using Concurrently Animated Views,”, Proc. of OOPSLA, Sept. 1988, pp. 191-205. King, R. and Melville, “Ski: A Semantics-Knowledgeable Interface,” Proc. of VLDB, Aug. 1984, pp. 30-33. Linton, M.A., Vilissides, J.M., and Calder, P.R., “Composing User Interfaces with InterViews,” IEEE Computer, Feb. 1989, pp. 8-22. Maryanski, F., and Hong, S., “A Tool For Generating Semantic Database Applications,” in Proc. of IEEE Int’l Computer Software & Application Conf., Oct. 1985, pp. 368-375. Maier, D., Nordquist, P. and Grossman, M., “Displaying Database Objects”, Proc. of 1st Int’l Conf. on Expert Database Systems, April 1986, pp. 15-30. ObjectWorks, ParcPlace Systems, Inc., 1990. Troger, O.D., “RIDL: A Tool for the COmputer Aided Engineering of Large Databases in the Presence of Integrity Constraints,” in Proc. of ACM SIGMOD, June, 1989, pp. 418-429. Weinand, A., Gamma, E., and Marty, R., “ET++ - An Object-Oriented Application Framework in C++,” Proceedings of OOPSLA, 1988, pp. 4657. Zdonik, S.B. and Maier, D., “Fundamentals of Object-Oriented Databases”, Readings in Object-Oriented Database Systems, edited by S. Zdonik and D. Maier, Morgan Kaufmann Publishers, Inc., 1990. Zoolf, M. M., “QBE/OBE: A Language for Office and Business Automation,” IEEE Computer, May 1981, pp. 13-23. Endnotes 1 Note that in the class hierarchy, two small boxes have been drawn aside of OBJECT class. They indicate that some superclasses and subclasses of OBJECT have not be displayed on the screen. The user can follow the indicators to reveal the hidden classes. In reverse, the user can hide a displayed class. 2 DBDesigner provides other operations for moving classes around in a displayed class hierarchy. But, they are not regarded as query operations. 3 If an object does not have a name, ONTOS always generates a unique name for that object. Shuguang Hong is an Assistant Professor of Computer Information Systems at Georgia State University. Prior to that he was a member of the technical staff at ONTOS, Inc. His research interests include the objectoriented approach to data modeling, database design, systems analysis and design, and graphical user interface tools. Joshua Duhl is the Product Marketing Manager at ONTOS, Inc. Prior to that he was a senior member of the technical staff. His interests include making technology work for people, creating and building and coaching high performance teams. Craig Harris is a founder and vice president of research at ONTOS, Inc. His interests include object-oriented approach to natural language understanding. Summer 1992 11 Related Content INDUSTRY AND PRACTICE: Another Look at On Time and Within Budget: An Agency Theory Explanation Robert C. Mahaney and Albert L. Lederer (1999). Journal of Database Management (pp. 41-42). www.irma-international.org/article/industry-practice-another-look-time/51221/ Enhancing the ER Model with Integrity Methods Mira Balaban and Peretz Shoval (1999). Journal of Database Management (pp. 14-23). www.irma-international.org/article/enhancing-model-integrity-methods/51223/ Enterprise Application Integration (EAI) Christoph Bussler (2009). Handbook of Research on Innovations in Database Technologies and Applications: Current and Future Trends (pp. 837-843). www.irma-international.org/chapter/enterprise-application-integration-eai/20769/ Practical Case Study of a Web-Based Tutor Payment System Tanguy Chateau, Cecile Leroy, Johanna W. Rahayu and David Taniar (2003). Web-Powered Databases (pp. 88-120). www.irma-international.org/chapter/practical-case-study-web-based/31425/ WebFINDIT: Providing Data and Service-Centric Access through a Scalable Middleware Athman Bouguettaya, Zaki Malik, Xumin Liu, Abdelmounaam Rezgui and Lori Korff (2009). Advanced Principles for Improving Database Design, Systems Modeling, and Software Development (pp. 225-254). www.irma-international.org/chapter/webfindit-providing-data-service-centric/4301/