Results 1 to 2 of 2
Thread: oracle question
- 05-01-2007, 10:40 PM #1
Member
- Join Date
- Apr 2007
- Location
- Pennsylvania,USA
- Posts
- 45
- Rep Power
- 0
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?
- 05-01-2007, 10:45 PM #2
Member
- Join Date
- Apr 2007
- Location
- Indiana
- Posts
- 83
- Rep Power
- 0
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.
Similar Threads
-
Question mark colon operator question
By orchid in forum Advanced JavaReplies: 9Last Post: 12-19-2010, 08:49 AM -
Oracle JDeveloper
By orchid in forum Other IDEsReplies: 3Last Post: 11-12-2008, 12:30 AM -
MS SQL2005 to Oracle DB
By bmongtangco in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 11-07-2007, 02:58 AM -
Oracle and JDBC
By Eric in forum JDBCReplies: 3Last Post: 08-11-2007, 08:49 PM -
oracle query with date question
By orchid in forum JDBCReplies: 1Last Post: 05-09-2007, 12:10 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks