• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Flat file

 
Frederik Ericsson
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9295
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Frederik Ericsson
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you JOE, let me go thru
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic