y name is Yahya. I am working as a Project Leader in an IT Industry in India
I am working on a new project with J2EE technology.
I am using Weblogic Application Server and Iplanet Web server for this project. It is for a bank. I will have to write a program in the server which will read a text files each containing records ranging from 700 to 2000.
These text files are submited by the users online. These records should be updated to their appropriate databases (there are totally 6 databases). I have a common table which will help me in locating the appropriate database to which I should append these records.
Since there will be a lot of such text files uploaded by the user, I need to find the most efficient way to update the database.
Some of the suggestions I received were to use
1. c/c++ routines to update the database.
2. PL/SQL routines to update the database.
It would be great if you can suggest me a best approach this problem.
Thank you.

Answer Wiki

The fastest possible way is to use a compiled language, with this logic flow:

Have a large, static array of record buffers
Open the input as a streamed (Unix or OS/400) or double-buffered (zOS) file.
Loop
Read a record
Leave the loop if EOF
Validate the record
If passed
Store its values into the array and increment the count
If the count is the same as the number of records the array can hold
Do a block insert of the array into the table
Set the count back to zero
End-if
Else
Generate an appropriate error message
End-if
End-loop
Close the input file
If there were errors
Roll back
Else
If there are records in the array
Do a block insert of the used portion of the array into the table
End-if
Commit
End-if

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your response...

Discuss This Question: &nbsp

There was an error processing your information. Please try again later.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your reply...

There was an error processing your information. Please try again later.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your reply...

Ask a Question

Free Guide: Managing storage for virtual environments

Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!

To follow this tag...

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy