wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes I need help with Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "I need help with "primary and foreign key" in my data migration code.... Please help." Watch "I need help with "primary and foreign key" in my data migration code.... Please help." New topic
Author

I need help with "primary and foreign key" in my data migration code.... Please help.

sneh gaurav
Greenhorn

Joined: May 07, 2011
Posts: 3
Hi
i am a student and i am in a jam over how to migrate between databases while keeping the primary key and foreign key intact.....

the conversion are of six types....

1. MS Access to MS SQL
2. MS Access to Oracle
3. MS SQL to Oracle
4. MS SQL to MS Access
5. Oracle to MS SQL
6. Oracle to MS Access

all the coding is done in jsp.

its my final year and i need this to work.....
sneh gaurav
Greenhorn

Joined: May 07, 2011
Posts: 3
Links to my jsp which contain the code..
open in notepad or any text editor.


http://www.mediafire.com/?3k04g5ydpllvs79
http://www.mediafire.com/?dc88aa4lu9ju690
http://www.mediafire.com/?7bfox2u8t2o88r2
http://www.mediafire.com/?iq1erf5ck7xf15u
http://www.mediafire.com/?wqfai85npy95b9e
http://www.mediafire.com/?hsssicizbesr76k
http://www.mediafire.com/?0q8436pbswrytwu
Timothy Schmelter
Greenhorn

Joined: Apr 25, 2011
Posts: 7
Hi Sneh,

This is a forum to help provide pointers to learn Java, so you're unlikely to find someone willing to simply review hundreds of lines of source code in multiple files so that they can do your homework for you. To get help here, or on any forum, distill your question to its simplest form, post the minimum amount of code needed to fully express your question, and keep your questions focused. In short, ShowSomeEffort. At a minimum, ask a question. Your post simply said "I need it to work." A worthy goal, to be sure, but hard to define.

Based on the one file I did inspect, you're using a JSP to do *everything*, from database setup to conversion to writing to the new database. This is bad practice; you should be using JSPs for presentation and delegating your business logic (i.e., the tasks of uploading files, converting them, writing to databases, etc) to separate, specialized classes. This allows you to break problems into common parts and reuse solutions in multiple locations, rather than recoding everything from scratch each time.

Best of luck on your project. If you have specific questions, do the work and put together a question here and I'm sure we'll jump on it--this community seems very eager to help out people who want to help themselves.

--Tim
 
wood burning stoves
 
subject: I need help with "primary and foreign key" in my data migration code.... Please help.