Actually, no, I'm not a one man shop. But I do have lots of awareness (I
started to write control, but that isn't true) about who else in the
shop is going to write code that accesses my tables. That awareness is
through the SVN source control as much as it is through shouts over the
cube-walls.
There are great tools available for designing database schemas. I don't
know any of them that have awareness of the System i need for short
names.
Another way to tackle this would be for the native access programmers to
build views (logicals) over the SQL-generated tables with meaningul
short names in the view.
The point that I'm making is that there just isn't a great need for
tooling to create short names. You design an application with external
tools, you are going to access it with code developed by the external
tools and that code is going to support long names. You are rarely going
to need to hand code some RPG to access the tables you design and build
with modern tools.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Wednesday, January 14, 2009 10:20 AM
To: Midrange Systems Technical Discussion
Subject: RE: Best Practices on DB2 SQL Databases
You must be a one man shop. Let's see, I have to write some native
access against a table. This table has meaningless short names,
therefore, I must have never used native access on it before. Guess
that means I can rename the short names with a good old alter table on
the fly and not concern myself if someone else wrote native access
against this table, (or Query/400 or SQL using the existing short names
or...). I'd rather name the short names to something meaningful on day
1 and alleviate the concerns.
Of course the expected reply is that someone has this Jim Dandy cross
reference tool that checks existing usage and never fails regardless if
it's RPG, CL, imbedded SQL, stored procedures, client based code,
encrypted variables used in "prepared" sql, and other impossibilities.
Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
From:
"Dan Kimmel" <dkimmel@xxxxxxxxxxxxxxx>
To:
"Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Date:
01/14/2009 11:11 AM
Subject:
RE: Best Practices on DB2 SQL Databases
Sent by:
midrange-l-bounces@xxxxxxxxxxxx
My practice has been to use the long names exclusively. Using database
design tools, I can make sure the long name is meaningful. I let DB2400
generate the short names, then rename to something meaningful if I need
to use the table in some "native" way.
DB2400 will generate almost meaningless short names. By "almost", I
refer to the practice that it will retain the first four or five
characters of the long name when it generates the short name. Those few
characters are sometimes all you need to make the short name meaningful.
If I NEED to use an SQL-generated table in an RPG program (or anything
else that needs short names) I'll change the short names with an ALTER
to something meaningful. I don't have to do that very often. Usually the
tables I design for my Java apps are used only by my Java apps.
Occasionally, though, I need to call an RPG or CL program from Java and
have that program read a table. I'll ALTER that table with meaningful
short names.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Campin
Sent: Tuesday, January 13, 2009 4:40 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Best Practices on DB2 SQL Databases
Our company is starting a project to develop a new generation of
applications written in Java. The problem arises with the databases
living on the AS/400.
The developer is using a Google tool to create the databases but that
creates a problem because the tables and field names are being created
with default names if the name is greater than 10 characters.
We want the databases to be meaningful from the AS/400 side (Meaningful
short names for tables and field names, Consistent record format names).
The way I have handled this in the past is to create the table using Ops
Nav and extract the SQL to create and change tables but that means doing
changes manually where the tools do it automatically.
Anybody got any suggestions on how you handled this problem? Do you know
of a tool that would deal with the AS/400's unique requirements (A long
and short name, format names, etc)?
Thanks in advance for any help.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.