wood burning stoves 2.0*
The moose likes Java in General and the fly likes File I/O Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "File I/O" Watch "File I/O" New topic
Author

File I/O

Dixit Saurabh
Greenhorn

Joined: Jun 26, 2010
Posts: 5
Hi

Currently I am working in a application, in which we are using a temporary table. Now we want to remove this temporary table because of performance. So someone suggested, I should create java file instead of table.

My question is that: Should I use java file instead of databse table? Would it be efficient than tables?

Kindly reply...
Thanks In advance

Joshua Barrett
Greenhorn

Joined: Sep 08, 2010
Posts: 27
Depends entirely on what you intend to do with the information. Could you provide more detail?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12758
    
    5
How much data is involved?

If this data structure could be placed in one of the Java collections, it is likely that you could serialize it out to file a lot faster than any database operation.

Bill
Dixit Saurabh
Greenhorn

Joined: Jun 26, 2010
Posts: 5
There are thousand of records. There are many number of batches, I insert every batch in to temporary table. Temporary table hold both type of batches(Good batch and bad batch). When insert batch into final table, got only good batch record from temporary table.

So in this case some one suggested to me, I should use java file instead of database. It will be efficient.

But I am not sure about this.
Sreelatha Sankaranarayanan
Greenhorn

Joined: Dec 10, 2010
Posts: 9
File I/O also can be expensive considering you have 1000s of records to persist. Have you considered using an XML repository or something on those lines so that fetching data can be more streamlined . You would need to decide on the data structure first and that would enable you to choose a solution.
 
 
subject: File I/O
 
Similar Threads
How can i use Hibernate for temporary tables
store a file in the server
CSV+truncate leading zero solution
Temporary Tables in Oracle
Implement store procedure in EJB !!!!