Jump to: navigation, search

Difference between revisions of "CDO/DB Store"

< CDO
m
 
(3 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
*Pluggable SQL dialect adapters. Includes support for [[Net4j/DB/Derby|Derby]], [[Net4j/DB/H2|H2]], [[Net4j/DB/HSQLDB|HSQLDB]], [[Net4j/DB/MySQL|MySQL]], [[Net4j/DB/PostgreSQL|PostgreSQL]] and [[Net4j/DB/Oracle|Oracle]] .  
 
*Pluggable SQL dialect adapters. Includes support for [[Net4j/DB/Derby|Derby]], [[Net4j/DB/H2|H2]], [[Net4j/DB/HSQLDB|HSQLDB]], [[Net4j/DB/MySQL|MySQL]], [[Net4j/DB/PostgreSQL|PostgreSQL]] and [[Net4j/DB/Oracle|Oracle]] .  
 
*Pluggable mapping strategies. Includes horizontal mapping strategy (one table per concrete class, no joins).  
 
*Pluggable mapping strategies. Includes horizontal mapping strategy (one table per concrete class, no joins).  
*Various mapping options by using EAnnotations on model elements: [http://git.eclipse.org/c/cdo/cdo.git/tree/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBAnnotation.java DBAnnotation.java]. See more in section [http://wiki.eclipse.org/index.php?title=CDO/DB_Store#Annotations Annotations]
+
*Various mapping options by using EAnnotations on model elements&nbsp;(see more in section [[#Annotations|Annotations]]).
  
 
== Configuration  ==
 
== Configuration  ==
Line 14: Line 14:
 
== Annotations  ==
 
== Annotations  ==
  
You can define some custom mappings on your model by using EAnnotations for DBStore.&nbsp;In order to optimize the schema on the database, it is recommended that you define the column length, specially when using the data type String.  
+
You can define custom mappings on your model by using EAnnotations for DBStore: [http://git.eclipse.org/c/cdo/cdo.git/tree/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBAnnotation.java DBAnnotation.java]
 +
 
 +
In order to optimize the schema on the database, it is recommended that you define the column length, specially when using the data type String.  
  
 
Example:  
 
Example:  

Latest revision as of 18:00, 20 November 2012

The CDO DB store is an implementation of the CDO IStore that allows to store models and meta models in relational databases. It does not use 3rd party components other than database vendor-specific JDBC drivers. The DB store is a proprietary O/R mapper.

Features

  • Supports all optional features of the CDO Server.
  • Pluggable SQL dialect adapters. Includes support for Derby, H2, HSQLDB, MySQL, PostgreSQL and Oracle .
  • Pluggable mapping strategies. Includes horizontal mapping strategy (one table per concrete class, no joins).
  • Various mapping options by using EAnnotations on model elements (see more in section Annotations).

Configuration

Annotations

You can define custom mappings on your model by using EAnnotations for DBStore: DBAnnotation.java

In order to optimize the schema on the database, it is recommended that you define the column length, specially when using the data type String.

Example:

 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
     <eAnnotations source="http://www.eclipse.org/CDO/DBStore">
         <details key="columnType" value="VARCHAR"/>
         <details key="columnLength" value="255"/>
     </eAnnotations>
 </eStructuralFeatures>



Wikis: CDO | Net4j | EMF | Eclipse