Results 1 to 2 of 2

Thread: oracle question

  1. #1
    sandor is offline Member
    Join Date
    Apr 2007
    Rep Power

    Default 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?

  2. #2
    pegitha is offline Member
    Join Date
    Apr 2007
    Rep Power


    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

  1. Question mark colon operator question
    By orchid in forum Advanced Java
    Replies: 9
    Last Post: 12-19-2010, 09:49 AM
  2. Oracle JDeveloper
    By orchid in forum Other IDEs
    Replies: 3
    Last Post: 11-12-2008, 01:30 AM
  3. MS SQL2005 to Oracle DB
    By bmongtangco in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 11-07-2007, 03:58 AM
  4. Oracle and JDBC
    By Eric in forum JDBC
    Replies: 3
    Last Post: 08-11-2007, 08:49 PM
  5. oracle query with date question
    By orchid in forum JDBC
    Replies: 1
    Last Post: 05-09-2007, 12:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts