Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-02-2007, 12:40 AM
Member
 
Join Date: Apr 2007
Location: Pennsylvania,USA
Posts: 46
sandor is on a distinguished road
oracle question
I have a java application that connects to an oracle database to perform crud operations. Now I have to add another feature where the user can perform batch adding of records. A file following a certain format is uploaded and the application parses the file and adds each of them to the table in the database.

The additional feature is that before adding, I must go through the whole file and mark all records that are already existing in the database. I could just do a for loop and perform a select statement for every record in the file, but is there a more efficient way to do this?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-02-2007, 12:45 AM
Member
 
Join Date: Apr 2007
Location: Indiana
Posts: 84
pegitha is on a distinguished road
Send a message via Skype™ to pegitha
Well, my recommendation would be to create a staging table, insert the records into it and then depending on how quickly you needed them to get into the real table you could do one of many things.
Two that come to mind are
1. kick off a store procedure that migrates them over to the other table.
2. have a cron job that runs every so often and moves them over.
Both can check for duplicates.
You might want to think about some constraints, but they do slow the inserts down.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question mark colon operator question orchid Advanced Java 4 11-12-2008 10:08 AM
Oracle JDeveloper orchid Other IDEs 3 11-12-2008 02:30 AM
MS SQL2005 to Oracle DB bmongtangco JavaServer Pages (JSP) and JSTL 0 11-07-2007 04:58 AM
Oracle and JDBC Eric Database 3 08-11-2007 10:49 PM
oracle query with date question orchid Database 1 05-09-2007 02:10 AM


All times are GMT +3. The time now is 01:33 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org