Introduction

Data Dictionary ] 2-tier-architecture ] 3-tier-architecture ] Java server pages ] Lock Manager ]

COBRA

Concise Object Relational Architecture

© Kimble Consultancy Services Ltd

14th June 1998

David George

Revision 1.4, 12 February, 2002

Summary

Object Oriented programming (OOP) has been touted as the silver bullet to solve today’s programming challenges. At the same time many systems will involve the manipulation of data stored in a Relational Database Management System (RDBMS). The dichotomy presented by interfacing the Object and Data models is often referred to as an ‘impedance mismatch’.

OO programmers are used to thinking in terms of the relations between classes that encapsulate both data and methods, database gurus think about the relations between data encapsulated in tables. COBRA is an object persistence layer written in the Java programming language. It is uses relational database technology to provided the persistent storage mechanism; however the store is fully encapsulate shielding programmers from the details of relational database access.

Design Goals

  1. The COBRA persistence layer fulfils the following requirements:

  2. Fully encapsulates the underlying persistence mechanism. Only the methods save, retrieve and delete need to be performed on an object in order to create, retrieve, update or delete its attributes. There is no need for programmers to hard code SQL into their objects.

  3. A data dictionary to map objects and their attributes onto their respective database, table and columns. Changing the database does not imply recompiling the application.

  4. Supports concurrent access by the same or different users to the persistence mechanism.

  5. Supports the grouping of actions on objects into discreet transactions

  6. Supports Object (or Persistence) Identifiers as a primary mechanism for identifying objects.

  7. Support legacy database schemas.

  8. Support database cursors. Prior to version 2.0 Java Database Connectivity (JDBC) does not directly support cursors, this omission can result in large amounts of data being transferred over the network where potentially only the first few rows of the query are of interest.

  9. Support for object inheritance and composition.

  10. Provide raw access to the persistence mechanism.

  11. Supports multiple architectures, e.g. 2 – n tier.

  12. Native support for distributed object architectures including Common Object Request Broker (CORBA) and Remote Method Invocation (RMI) Concise Object Relational Architecture

  13. Support Multiple databases simultaneously.

  14. Support for Java Database Connectivity (JDBC)

  15. Provided access to RDBMS table meta data.

  16. Permit retrieval/update/deletion of single or sets of objects based on sophisticated selection criteria

  17. Support pre-compiled SQL for efficiency

Not all of these objectives will be fulfilled in earlier releases.