Frequent use of type codes is a sign of complex data. Relational DBMSs do not handle types well. As a result, identification and processing of type codes must be done in program code when using an RDBMS.
The figure at the left shows a "productType" field in a relational table that is used to differentiate processing for various types of products. Different type codes, for example, could identify types of sweaters and slacks in a clothing database.
To compare, in an ODBMS, types are an inherent part of the class hierarchy as shown in the figure below. In fact, the code for each type can be attached to the appropriate classes in the class hierarchy. In an ODBMS, the type codes are replaced with a class hierarchy with the method code attached. More on processing type codes.
More detail for the current topic:
More on the general topic: Complex Data
- Lack of Unique Identification
- Many-to-Many Relationships
- Access Using Traversals
- XML File for the Complex Data Example
Related Fact Book and Implementation Stories
Author: Douglas K Barry
You may use this material for your work or classes. Reprint Policy. Be sure to check the menu at the left for other articles available on this site.
The Savvy Manager's Guide
Douglas K Barry is also the author of a book that explains Web Services, service-oriented architecture, and Cloud Computing in an easy-to-understand, non-technical manner.
Web Services, Service-Oriented Architectures, and Cloud Computing: The Savvy Manager's Guide (Second Edition)
by Douglas K Barry with David Dick
This is a guide for the savvy manager who wants to capitalize on the wave of change that is occurring with Web Services, service-oriented architecture, and—more recently—Cloud Computing. The changes wrought by these technologies will require both a basic grasp of the technologies and an effective way to deal with how these changes will affect the people who build and use the systems in our organizations. This book covers both issues. Managers at all levels of all organizations must be aware of both the changes that we are now seeing and ways to deal with issues created by those changes.