Other differences:
- There is no native auto-incremenet i.e. no IDENTITY (a BIG short-coming
IMHO)
- DO NOT use BLOB's for VARBINARY like in DB2/UDB, use "VARCHAR (32000) FOR
BIT DATA"
another way:
AS400:
Integrated Database
Collections(s)(really just a library with some tweaking and
journalling auto-created)
Table(s)
View(s), etc....
- A BIG plus over regular DB2 is the abillity to alter the columns(size,
type, etc.) within a table on the fly without having to re-create the table
from scratch.
Scott
-----Original Message-----
From: Matthew Inger [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 12, 2001 1:19 PM
To: [EMAIL PROTECTED]
Subject: Re: Turbine and DB2/400
here's some major differences:
1) Organization of the database
Db2/UDB:
DB2 Instance
Database(s)
Schema(s)
Table(s)
View(s), etc...
AS400:
Integrated Database
Library(s)
Table(s)
View(s), etc....
2) The AS400 does not support the "set current schema" command.
In db2, when you log in as user "x", the db assumes you're using
the schema named "x" in the database you've logged into. To set
the schema to something other than the user name, issue the command
"set current schema = schema_name" as if it were an sql update.
On the as400, you don't log into a particular database, but rather
the integrated database as a whole (you can think of the integrated
database being one db2 database, and a library as being a schema).
You use the "libraries" property to specify your library (if
different than the user name):
Properties p = new Properties();
...
p.put("libraries", "libname"); // default library
p.put("prompt", "false"); // see point 4
p.put("user", ...);
p.put("password", ...);
Connection c = DriverManager.getConnection(url, p);
3) There are going to be some differences in the supported SQL
features. for example, one of them supports the "cross join"
syntax for cross joins, the other does not (i forget which).
But both support the syntax:
select * from a,b
as being a cross join.
4) The as400 will pop up a dialog box if you specify incorrect
login information when you call getConnection. To avoid this,
you can set the "prompt" property to "false" in your driver
properties (in example 2)
If you stick to what works in db2 however, you
should be able to migrate well to the as400. Basically,
develop your adapter for DB2 first, and then extend it
to account for the differences.
On Fri, 2001-10-12 at 12:52, Martin Poeschl wrote:
> what are the differences between DB2 and DB2/400 implementations?
>
> send me a zip and i'll check your stuff and add it to cvs
>
> - martin
>
> "Weaver, Scott" wrote:
>
> > Jacopo,
> >
> > Turbine is definitely a worthy solution and the peers methodology is SO
much
> > easier to grasp then EJB's. I've been busy with projects other than
> > Turbine lately, but I was successful in getting the Turbine demo
application
> > (newapp) to work flawlessly with DB2/400. I was also able to get Torque
to
> > generate the peers AND the DB2/400 tables with zero modification on the
> > AS400 save for actually creating the database collection on the AS400
before
> > running Torque.
> >
> > Here is a run down of what I did to get Turbine/Peers/Torque to work for
> > DB2/400:
> >
> > 1. Create db2400 specific Torque stuff.
> > 2. Create a Turbine DB adapter for DB2/400.
> > 3. Had to modify the village api because it did some ResultMetaData
checking
> > that did not work correctly for DB2/400 (isReadOnly always returns
false).
> >
> > If you would like, I can send you the result of my blood, sweat and
tears ;)
> > in a zip if you want it. It will put you ahead of the game in terms of
> > getting Turbine up and running with DB2/400.
> >
> > To the Turbine Project leaders,
> >
> > Would you consider this a worthy contribution to the Turbine project? I
am
> > newbie when it comes to using the CVS. So far I've only used the CVS
> > (WinCVS as a client) to download source, never to upload. So, if you
> > consider this DB2/400 stuff a worthy contrib, let me know.
> >
> > Regards,
> > Scott Weaver
> > Rippe & Kingston System, Inc.
> > Email: [EMAIL PROTECTED]
> >
> > -----Original Message-----
> > From: Jacopo Cappellato [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, October 12, 2001 9:29 AM
> > To: [EMAIL PROTECTED]
> > Subject: Turbine and DB2/400
> >
> > Dear Scott,
> >
> > at now I'm syuding the Turbine framework and I'm considering the
possibility
> > to use DB2/400 as DBMS.
> > I've read from the turbine-user mail archive your messages about your
work
> > on the Torque peer's implementation for DB2/400.
> >
> > Since I don't know if you've managed to work with Turbine and DB2/400,
my
> > question is:
> > do you still think that is a good idea/solution working with DB2/400
peers?
> > If so, could you give me some hints on developing this implementation
(e.g.
> > the DB2 implementation is a good starting point, what are the main
> > differences between DB2 and DB2400 implementations?)?.
> >
> > Thank you in advance!
> >
> > Jacopo
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
Matt Inger ([EMAIL PROTECTED])
Sedona Corporation
455 S. Gulph Road, Suite 300
King of Prussia, PA 19406
(484) 679-2213
"Self-respect - the secure feeling that no one,
as yet, is suspicious." -H.L. Mencken
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]