aspose file tools*
The moose likes I/O and Streams and the fly likes Flat file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Flat file" Watch "Flat file" New topic
Author

Flat file

Frederik Ericsson
Ranch Hand

Joined: Apr 27, 2005
Posts: 128
Hello Friends,


I would like to store a audio data in a DB using streams, is it feasible to store and retrive from Falt file Database? how much will it support? what might be the drwbacks?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8866
    
    8

Originally posted by Frederik Ericsson:
is it feasible to store and retrive from Falt file Database?

Yes.



how much will it support?

That depends on your file system limitations.



what might be the drawbacks?

You will have to write the code to maintain the database (insert, delete, update, search, index, recover from corruption and so on). If you do run into file system limitations, you will have to code around them.
See here for an interesting exercise in creating a simple database.
Depending on your requirements, you may want to go even simpler. I implemented a "database" for user documents by creating a directory with subdirectories named for the user's ID:

Since I always know the user id I don't need a search capability. I just construct a path to the user's directory and list the files for display on the application. I can use file system commands to maintain the "database" so I don't have to implement any functionality myself.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Frederik Ericsson
Ranch Hand

Joined: Apr 27, 2005
Posts: 128
thank you JOE, let me go thru
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Flat file