× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Today's ORM tools prefer to generate database objects as well. The idea is
that a high level developer isn't supposed to care or know about the
database layer whatsoever. This is a beautiful thing, in theory of course.
One problem I have with ORM tools is that they don't really work well with
existing DB2 for i databases. And it is foolish to change existing databases
just to ease the life of an ORM tool user.
Sad thing is that it doesn't really take much to make an existing database
work for most ORM tools. Usual requirements are primary keys (single field
works best) and referential constraints.
But I digress...

I don't know what is the best solution is for this particular scenario...
Java developer probably has no control over the ORM tool's database script
generation so the only solution I see is to change things after the fact.
Or use short names as many have suggested.

BTW, if another database generation tool is in play, I have seen a db
architect use IBM's RDi for SOA to generate databases. Tool still has some
quirks but it worked well most of the time. It created a logical model in
XML and then you can rerun that any time to recreate the entire database.
It is not an ORM tool though.

All that said, having a Java developer create a DB2 for i database just
doesn't sit well with me. There's too much abstraction there and once
issues like performance pop up, he won't be able to effect meaningful
changes at the database level, since he really isn't the one generating the
database, the ORM tool is. So he'll fall back to calling Alan to "fix" the
database performance (or call for going to another platform, as these
developers often do).

Using the Generate SQL DDL shouldn't be hard either... you can probably
write a program to go through all of the database objects and alter them as
you see fit. Short name might not be the only thing you want added either.
You might want check constraints, unique constraints, labels (i.e. column
headings), indexes...

Elvis

Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400
www.centerfieldtechnology.com


-----Original Message-----
Subject: Re: Best Practices on DB2 SQL Databases

From: Walden H. Leverich
I would assume (hope/pray) that the java developers were using
some sort of ORM... so they don't really care about theDB column
names, they'll never be using them.

That kind-of begs the question - why not use SQL scripts and the RUNSQLSTM
command, or plain old DDS to define tables? Then Java developers could
tailor the ORM to their liking.

The thing that would be nice, would be a CL command that converted DDS to
SQL.

Nathan.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2024 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.