DataNucleus support for persistence to RDBMS Datastores
Switch branches/tags
datanucleus-rdbms-5.1.7 datanucleus-rdbms-5.1.6 datanucleus-rdbms-5.1.5 datanucleus-rdbms-5.1.4 datanucleus-rdbms-5.1.3 datanucleus-rdbms-5.1.2 datanucleus-rdbms-5.1.1 datanucleus-rdbms-5.1.0-release datanucleus-rdbms-5.1.0-m4 datanucleus-rdbms-5.1.0-m3 datanucleus-rdbms-5.1.0-m2 datanucleus-rdbms-5.1.0-m1 datanucleus-rdbms-5.0.10 datanucleus-rdbms-5.0.9 datanucleus-rdbms-5.0.8 datanucleus-rdbms-5.0.7 datanucleus-rdbms-5.0.6 datanucleus-rdbms-5.0.5 datanucleus-rdbms-5.0.4 datanucleus-rdbms-5.0.3 datanucleus-rdbms-5.0.2 datanucleus-rdbms-5.0.1 datanucleus-rdbms-5.0.0-release datanucleus-rdbms-5.0.0-m5 datanucleus-rdbms-5.0.0-m4 datanucleus-rdbms-5.0.0-m3 datanucleus-rdbms-5.0.0-m2 datanucleus-rdbms-5.0.0-m1 datanucleus-rdbms-4.1.19 datanucleus-rdbms-4.1.18 datanucleus-rdbms-4.1.17 datanucleus-rdbms-4.1.16 datanucleus-rdbms-4.1.15 datanucleus-rdbms-4.1.14 datanucleus-rdbms-4.1.13 datanucleus-rdbms-4.1.12 datanucleus-rdbms-4.1.11 datanucleus-rdbms-4.1.10 datanucleus-rdbms-4.1.9 datanucleus-rdbms-4.1.8 datanucleus-rdbms-4.1.7 datanucleus-rdbms-4.1.6 datanucleus-rdbms-4.1.5 datanucleus-rdbms-4.1.4 datanucleus-rdbms-4.1.3 datanucleus-rdbms-4.1.2 datanucleus-rdbms-4.1.1 datanucleus-rdbms-4.1.0-release datanucleus-rdbms-4.1.0-m4 datanucleus-rdbms-4.1.0-m3 datanucleus-rdbms-4.1.0-m2 datanucleus-rdbms-4.1.0-m1 datanucleus-rdbms-4.0.12 datanucleus-rdbms-4.0.11 datanucleus-rdbms-4.0.10 datanucleus-rdbms-4.0.9 datanucleus-rdbms-4.0.8 datanucleus-rdbms-4.0.7 datanucleus-rdbms-4.0.6 datanucleus-rdbms-4.0.5 datanucleus-rdbms-4.0.4 datanucleus-rdbms-4.0.3 datanucleus-rdbms-4.0.2 datanucleus-rdbms-4.0.1 datanucleus-rdbms-4.0.0-release datanucleus-rdbms-4.0.0-m4 datanucleus-rdbms-4.0.0-m3 datanucleus-rdbms-4.0.0-m2 datanucleus-rdbms-4.0.0-m1 datanucleus-rdbms-3.2.13 datanucleus-rdbms-3.2.12 datanucleus-rdbms-3.2.11 datanucleus-rdbms-3.2.10
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


DataNucleus support for persistence to RDBMS Datastores. This plugin makes use of JDBC drivers for the datastores supported.

This project is built using Maven, by executing mvn clean install which installs the built jar in your local Maven repository.


License : Apache 2 licensed
Issue Tracker :
RoadMap :
Javadocs : 4.0, 3.2, 3.1, 3.0, 2.2, 2.1, 2.0, 1.1, 1.0
Download(Releases) : Maven Central
Download(Nightly) : Nightly Builds
Dependencies : See file pom.xml

Datastore Adapters

Each supported datastore will have an associated "adapter" stored under, so if planning on supporting or improving support for a datastore this is the place to look (as well as in plugin.xml.

SQL Generation

All SQL generated by datanucleus-rdbms from version 2.0 onwards use an SQL API (in package

Table Groups

A table group is a group of tables in the SQL statement. The SQL statement will be composed of 1 or more table groups. A table group equates to an object in an object-based query language. For example the candidate object will be in the first table group. When a relation is navigated the related object will be in its table group. And so on. All of the way down an inheritance tree will use the same table group; by that we mean that if you have a class Person and class Employee which extends Person and they have their own tables in the datastore, then when referring to the candidate object of type Employee, the tables PERSON and EMPLOYEE will be in the same table group.

Table Naming

With the SQLStatement API a developer can define the aliases of tables in the SQL statement. If they don't define an alias then the aliases will be generated for them using a DataNucleus extension. The plugin-point defines an interface to be implemented by plugins for naming of tables. The default option is alpha-scheme.

alpha-scheme will name tables based on the table group they are in and the number of the table within that group. So you will get table aliases like A0, A1, A2, B0, B1, C0, D0. In this case we have a candidate object in the query with 3 tables (A0, A1, A2) and relations to an object with 2 tables (B0, B1) and these have relations to other objects with a single table (C0), (D0).

t-scheme will name tables based on the table number in the statement as a whole and doesn't use the table group for anything. So you get table aliases like T0, T1, T2, T3, T4, T5, etc.

To define which namer plugin you want to use, set the extension datanucleus.sqlTableNamingStrategy on the SQLStatement and by the persistence property datanucleus.rdbms.sqlTableNamingStrategy at construction of the PMF/EMF.