Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Oracle / MS SQLServer - string concatenation & other migration issues

Re: Oracle / MS SQLServer - string concatenation & other migration issues

From: Douglas Reay <douglasr_at_chiark.greenend.org.uk>
Date: 23 Jul 2001 10:57:47 +0100 (BST)
Message-ID: <3EB*g1V1o@news.chiark.greenend.org.uk>

Allan K <alank_at_dsl.net> wrote:
>
> Douglas Reay <douglasr_at_chiark.greenend.org.uk> wrote:
>>
>> am I stuck with forking the java?
>
> Hi Douglas,
>
> This is not an answer to your question but perhaps a suggestion for future.
> I learned my lesson about a year ago when I had to do a similar thing. The
> suggestion is not to mix your database code with the business logic or
> front-end. There are tools in the market, like Cocobase from Though Inc.
> that would generate the Java code for you. If you are looking for cheaper
> solutions that visit http://www.imranweb.com and read the technical article
> about MVC written by this fellow. He has an application that comes with
> source code that generates Java objects that map to your database.
>
> I suggest that if you end up changing a lot of code, consider using any of
> these products. So that if you have to change your queries, they all are in
> one place and can be done easily.

Thanks for the suggestions. I've now read Imran's paper, and looked through the Cocobase documentation. I agree it is not an answer to my current question (I'm working under time, financial and licensing policy constraints on a legacy codebase).

If I have to go the forking route, I was planning on using some

    public static final String
statements for the names of all tables and fields in those tables, and centralise in a single class any java that needs to be aware of the database type. (Most of the SQL is stored as XML in files.)

Douglas

-- 
Douglas Reay          Matrix House, Cowley Park, Cambridge, CB4 0HH, UK
The Mathworks Ltd.               http://www.mathworks.co.uk/consulting/
Engineering Consultant (PUME)                  <dreay_at_uk.mathworks.com>
Powertrain Unified Modeling Environment           +44 1223 423200 x 215
Received on Mon Jul 23 2001 - 04:57:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US