The AS/400 database is DB2, and is a fully relational database.

However, this is only quite recently the case (like 10 years or so since
V5R2).

The DB2 on AS/400 is much less restricted than "other" databases.
For example, FK relations do not have to be explicit and therefore the
database does not always check for consistency.
It is possible to define constraints, but not necessary.
Also, transactions are supported (commitment control) but do not have to be
used.
Likewise, SQL is fully supported, but is not needed to access the database.


Most RPG software is written before DB2 on AS/400 evolved into a "real"
relational database.
So most RPG software does not use SQL but instead uses "record-level
access".

In my experience, most AS/400 sites don't use any "relational" features.
Most RPG programs were witten in the 80's and 90's and use the database
mostly as a collection of tables, each having one or more indexes.
No transactions, consistency checking, and normalized structure.

So only if at your situation you have a normalized database you could use
JPA.
However, this is likely not the case so you have lots of repeating groups
for example in which case JPA does not work as it is purely "relational" and
SQL can't cope with repeating groups, the database must be normalized.

So in this case you are probably better of with JDO (which is agnostic to
the structure of database), or use plain SQL (JDBC).




On Fri, Aug 19, 2011 at 11:34 AM, MANUEL FIDALGO SICILIA <
manuel.fidalgo@xxxxxxxxxxxxxxxxxx> wrote:

Dear all,

Foremost, I would like to say that I'm new to the AS/400 world so sorry
if I ask stupid things...

At work we are using v6r1m0 and we would to write some Java programs
using the AS/400 as database.

The problem comes when deciding what persistence engine to use: I can't
see clearly if the AS/400 is relational or non-relational and I would
like to know which should be better JPA or JDO. I know some people use
JPA but I'm wondering if it is not better to use JDO which has support
for both relational and non-relational and if JPA will have performance
problems because it is made for relational.

So what do you think? JDO or JPA? Or maybe just jdbc!

Thanks in advance!



Jose Manuel

--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing
list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.