• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 7
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Put a gun against his head, pulled my trigger, now he's dead, that tiny ad sure bled
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic