![C++ Object Databases: Programming with the ODMG Standard](http://prodimage.images-bn.com/pimages/9780201634884_p0_v1_s192x300.jpg)
C++ Object Databases: Programming with the ODMG Standard
by David JordanView All Available Formats & Editions
In 1991, the Object Database Management Group (ODMG) was formed to define standard interfaces for object databases. This standardization has since been achieved, and the popularity of object databases is on the rise. Similar to using SQL to access a relational database, the ODMG provides a corresponding standard for object databases. This book, technically
… See more details belowOverview
In 1991, the Object Database Management Group (ODMG) was formed to define standard interfaces for object databases. This standardization has since been achieved, and the popularity of object databases is on the rise. Similar to using SQL to access a relational database, the ODMG provides a corresponding standard for object databases. This book, technically reviewed by ODMG members, provides a comprehensive description of C++ object databases, including the C++ and Object Query Language (OQL) interfaces of the ODMG standard.
C++ Object Databases is the indispensable guide and reference to programming with C++ object databases. With this book, you will gain a thorough knowledge of the underlying modeling concepts, interfaces, and architectures. To ease the transition to object database programming, comparisons with relational databases and SQL are provided, including contrasts with the object facilities planned for SQL3.
Object databases uniquely support an object-oriented data model that is shared by the database and the application, and their tight integration with an object programming language allows developers to realize increased productivity. OQL provides excellent declarative query access to objects, supporting the same object model used by the application. C++ is currently the dominant language supported by object databases and therefore is the basis for this book.
As most object database vendors now support ODMG interfaces in their products, a working knowledge of the topics herein is essential to object database programmers. The author is uniquely qualified to present this material. He serves as the ODMG C++ Editor and has been co-editor of threeODMG books, covering releases 1.1, 1.2, and 2.0.
0201634880B04062001
Editorial Reviews
Product Details
- ISBN-13:
- 9780201634884
- Publisher:
- Addison Wesley Professional
- Publication date:
- 10/31/1997
- Series:
- The Addison-Wesley Object Technology Series
- Edition description:
- New Edition
- Pages:
- 480
- Product dimensions:
- 7.60(w) x 9.55(h) x 1.10(d)
Read an Excerpt
PREFACE:
It seems I was destined from the beginning of my career to be involved in object database technology. My academic advisers unintentionally led me toward the technology. Mike Warren, my undergraduate psychology professor, got me interested in both semantic network modeling and computer science. Upon graduation in 1979 I took a job with NCR Corporation in Dayton, Ohio, and pursued my M.S. in computer science at Wright State University. At NCR I worked with network model databases and was on a team that ported UNIX to an NCR machine. Along with my adviser at Wright State, Bob Dixon, I became interested in object technology when Smalltalk-80 was introduced; we worked on several object-based projects.
When I completed my master's degree in 1983, I took a job with AT&T Bell Laboratories in the UNIX System Development Laboratories at Murray Hill, New Jersey. I was very fortunate to have Tom Cargill as my mentor. Tom was developing a debugger called pi (process inspector) in a new programming language being designed by Bjarne Stroustrup. Knowing C and wanting to use object technology, I began learning C++ in 1984.
Early in 1985 I transferred to the Bell Labs site in Columbus, Ohio, where I still reside. My project developed a factory engineering application for managing circuit pack designs and the processes used to manufacture the packs. I was responsible for the database schema design and also served as the C++/OOD facilitator on the project. I began reading about a new technology called object databases. CAD/CAM was one of the original application domains to use object databases. The technology appealed to me, because it combined my interests in objects anddatabases, and was applicable to the project I was working on. Just a handful of commercial products were available, and they were based on special-purpose proprietary languages that integrated database functionality. It seemed that the technology would not gain very much market acceptance unless a more mainstream, general-purpose programming language was used.
At OOPSLA '85 I met Tim Andrews of Ontologic, which had a commercial object database product called Vbase. The company had its own object language called COP, which was C with object and database extensions. I encouraged Tim and others at Ontologic to abandon COP and use C++ instead. We considered establishing a joint business relationship between Bell Labs and Ontologic to jointly develop a C++ object database product, but Bell Labs wasn't interested. Ontologic developed the C++ product anyway, and I served as a member of its Technical Advisory Board. Ontologic released the first commercial C++ object database product in 1987. I tried to convince my project management and others at Bell Labs to use the technology, but they were reluctant because of a lack of standards and the absence of major players in the marketplace.
In 1992 I learned that Rick Cattell had organized a consortium of object database vendors, called the Object Database Management Group (ODMG) to define standards for object databases to be adopted by all the vendors. At last! A standard interface supported by all the vendors would lead to market acceptance. Each vendor had selected several people to serve as reviewers of the standard. Joshua Duhl, the Ontologic ODMG representative, selected me to be a reviewer. In 1993 Rick Cattell invited me to become the ODMG C++ editor. I was ecstatic. Rick had offered me an incredible opportunity. The ODMG had just released its 1.0 specification. I joined the ODMG and have served as its C++ editor for releases 1.1, 1.2, and 2.0. Implementations of the standard are now available from many of the vendors.
This book describes object databases using the ODMG C++ and Object Query Language (OQL) interfaces. It can serve as an introduction to object database technology and as a reference for anyone using an implementation of the ODMG standard.
The Audience for This Book
This book is targeted toward software developers who are knowledgeable about object design and C++ and want to learn about object databases. Managers are encouraged to read the book Object Databases: The Essentials, by Mary Loomis. Other books are available that cover more technical details of object database implementations. Rick Cattell's book Object Data Management is an excellent reference.
The Role of Object Database Vendors
By design, this book does not directly discuss any particular vendor or implementation. Aspects of implementations change over time as architectures adapt to advancements in computer environments and the demands of users. Other books that discuss implementation aspects of object databases have become outdated as the technology has advanced and matured.
I chose not to compare the vendors directly. As ODMG C++ editor, I need to maintain a good relationship with the vendors. If I had compared the vendors directly I would probably have gotten every vendor upset with me. People tend to react more to negative statements than to positive ones. Every implementation design decision has both positive and negative side effects. Application developers have biases based on their system requirements that guide their choice of the best architecture for their needs. Readers who want to understand the feature differences among the vendors should obtain a copy of The Object Database Handbook: How to Select, Implement, and Use Object-Oriented Databases by Doug Barry.
A Quick Tour of the Book
This book is divided into four parts. Part I covers object database modeling. The first chapter provides an introductory example to give you a feel for what it is like to develop a complete application with a C++ object database. Chapter 2 shows how to open a database, begin transactions, and commit transactions. The object modeling facilities found in an object database environment are covered in Chapters 3-9. The ODMG 2.0 standard is described. No vendor-specific interfaces are covered, although some aspects of various implementations are discussed.
Part II covers the Object Query Language (OQL), which has been adopted by the ODMG as the standard query language for object databases. It is assumed that you are not already familiar with OQL, so the OQL chapters read like a language reference manual. Object databases have historically been weak in their query language support, especially compared with relational databases. Some object database vendors have implemented their own variations of SQL access; each vendor maps the object model to SQL differently, resulting in a loss of application portability despite the use of the same query language. OQL is a powerful query language for objects, and its implementation by all the vendors will greatly enhance the acceptance of object databases. Those vendors who have not yet implemented OQL yet are driven by market demand for SQL support. If developers want query language standardization for object databases, they should insist that vendors support OQL.
Part III discusses the various architectures used by object databases. Rather than rewrite their systems from scratch, most ODMG implementers place an ODMG interface on their existing architectures. There are many differences among the vendor architectures, something that can affect the suitability of a vendor's product for a particular application. Understanding these differences is important when you're deciding among the product offerings. Performance is also covered here because the performance characteristics of an object database are often derived from its underlying architecture. Part III concludes with a discussion of the schema representation.
Part IV examines relational and object-relational databases, contrasting them with object databases. There is also a discussion of object support in the 1996 draft version of the ANSI SQL3 document as well as some musings about the future of each of these technologies with respect to Java.
The appendices have a different style from that of the body of the book. Appendix A contains the declarations of classes used by the book's examples. Appendix B and C are a complete reference to the ODMG 2.0 C++ interface. Because implementations available in the marketplace were still based on the ODMG-93 1.2 interface, I have noted the differences between the releases so that you can use this book with either release. Appendix C is devoted to the metaclasses introduced in ODMG 2.0. These classes are used by an application to access a description of a database's schema. An overview of these classes appears in Chapter 16.
Acknowledgments
I would like to thank those who provided me with software used in the writing of the examples. FranAois Bancilhon of O2 Technology and Dirk Bartels of Poet Software contributed their implementations of the ODMG-93 release 1.2 standard. Richard Patterson of Microsoft provided me with a Visual C++ 4.0 compiler, and Chris Tarr of ObjectSpace provided an STL implementation.
I gratefully acknowledge the time and effort of those who reviewed drafts of this book, including Donna Autrey, Sophie Gamerman, Carter Glass, Howard Lee Harkness, Richard Jensen, Tina Jordan, Brian Kernighan, Raymond Lai, Ed Schiebel, Olaf Schadow, Ken Sinclair, and Kathy Stark. Very special thanks goes to my friend Dennis Leinbaugh, who not only provided extensive editorial comments but also served as a professional colleague to bounce ideas off of. I would also like to thank the team at Addison-Wesley, including Katie Duffy, Marina Lang, Pamela Yee, and Jacqui Young. A special thanks also goes to Betsy Hardinger who served as copy editor, this book and future writings will benefit greatly from the things I learned from her editorial comments. Finally, I would like to extend my sincere appreciation to Mike Hendrickson and John Wait of Addison-Wesley for giving me the opportunity to publish this book.
0201634880P04062001
Customer Reviews
Average Review: