1

Note: This is not a programming question (at least at the moment). Once I start progressing further would seek assistance from the community on programming questions. Feel free to delete this, if this question is deemed inappropriate.

I am trying to start using DashDB as a Database on Bluemix. The DashDB data would be consumed by a Java/Java EE app

I am not planning to use this as a Data warehouse.

DashDB as I understand it has two flavours - Regular (using this term loosely here to refer to the standard offering ) and DashDB Transactional.

DashDB Transaction, i believe is used for transactional workloads.

  1. I wanted to understand if JPA would play well with DashDB. I am unable to locate good information in this space.
  2. Should we use denormalized design for both DashDB Regular and Transactional?
Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Manglu
  • 10,744
  • 12
  • 44
  • 57

2 Answers2

2

The dashDB Transactional Bluemix plan provides a dashDB database that is optimized for online transaction processing (OLTP). This means that it is designed for highly structured repetitive processing and it supports ACID transactions. That said you should use all the best practices you would use with a classic RDBMS: normalization, constraints and so on. I confirm that the dashDB-JPA integration is not well documented yet, but there should be no particular problem in using it with JPA. Since your application will run on Liberty Runtime, when you bind the dashDB service instance the server.xml is automatically configured with dataSource with a JNDI name and the database driver jars are also added.

Umberto Manganiello
  • 3,213
  • 9
  • 16
-1

JPA does not work seamlessly with DashDB today. DashDB uses organized by column be default and JPA does not work well with it. There is no specific way today to set organize by row using an annotation in JPA. We tried to override the DB2Dictionary but that did not work either.

If i drop the table using sql statement and recreate the table using sql statement appended with organize by row, then JPA is able to read the table.

Not sure who should be fixing this issue - JPA or DashDB :)

Sacky San
  • 1,535
  • 21
  • 26
  • The new dashdb transactional DB plan implements organize by row and works well with JPA. But if you are using a cheaper (free up to 1gb) or analytics plan they still don't with with JPA. the workaround is to create tables manually using organize by row before you start using jpa – Sacky San Feb 22 '17 at 10:56