Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "CDO/Hibernate Store/Architecture"

Line 3: Line 3:
 
The [[CDO_Hibernate_Store|CDO Hibernate Store]] makes use of 2 distinctive components:
 
The [[CDO_Hibernate_Store|CDO Hibernate Store]] makes use of 2 distinctive components:
 
* [http://www.hibernate.org Hibernate]: for runtime object relational mapping from CDO objects to a relational database, support for HQL queries from the client.
 
* [http://www.hibernate.org Hibernate]: for runtime object relational mapping from CDO objects to a relational database, support for HQL queries from the client.
* [http://www.eclipse.org/modeling/emf/?project=teneo Teneo]: responsible for the Model-Relational mapping from one or more ecore models possibly annotated with JPA annotations to control the mapping.
+
* [[Teneo|Teneo]]: responsible for the Model-Relational mapping from one or more ecore models possibly annotated with JPA annotations to control the mapping.
  
The Teneo component is focused on generating the mapping to Hibernate. The actual runtime implementation consists of an implementation of a CDO data store (supporting the CDO api for data stores) and Hibernate itself.
+
The Teneo component is focused on generating the mapping to Hibernate (so the runtime components of Teneo are not used). The actual runtime implementation consists of an implementation of a CDO data store (supporting the CDO api for data stores) and Hibernate itself.
  
 
The image below illustrates the relation between the components. It shows that the store implementation itself is transparent to the client. The Hibernate store supports the same api as other CDO stores. The Hibernate store has an additional feature that it supports [[CDO_Hibernate_Store_HQL|HQL]] as the query language on the client.
 
The image below illustrates the relation between the components. It shows that the store implementation itself is transparent to the client. The Hibernate store supports the same api as other CDO stores. The Hibernate store has an additional feature that it supports [[CDO_Hibernate_Store_HQL|HQL]] as the query language on the client.

Revision as of 12:54, 21 January 2010


The CDO Hibernate Store makes use of 2 distinctive components:

  • Hibernate: for runtime object relational mapping from CDO objects to a relational database, support for HQL queries from the client.
  • Teneo: responsible for the Model-Relational mapping from one or more ecore models possibly annotated with JPA annotations to control the mapping.

The Teneo component is focused on generating the mapping to Hibernate (so the runtime components of Teneo are not used). The actual runtime implementation consists of an implementation of a CDO data store (supporting the CDO api for data stores) and Hibernate itself.

The image below illustrates the relation between the components. It shows that the store implementation itself is transparent to the client. The Hibernate store supports the same api as other CDO stores. The Hibernate store has an additional feature that it supports HQL as the query language on the client.


TBD: add a slide here


At runtime the components (CDO, Teneo, Hibernate) operate together to provide a complete solution:

  • at startup the package store is created to store ecore packages in the database. The package store uses Hibernate to store ecore packages in a fixed database schema.
  • when the client registers a new ecore package and commits then the following actions take place:
    • the new ecore package is stored in the database (using the package store)
    • a new mapping is generated (using Teneo) for the new ecore package and all the already existing packages
    • the hibernate store (which stores the actual data) is re-initialized with the new mapping
    • depending on specific Hibernate properties the database schema is updated
  • when the user commits actual CDO objects then hibernate is called to update/insert/delete the objects from the database
  • the user can fire HQL queries directly from the client to server. The Hibernate QueryHandler takes care of executing the queries and returning the results.



Wikis: CDO | Net4j | EMF | Eclipse

Back to the top