• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating a flat file

 
Al Kaiser
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I create a flat file as opposed to database and use that file to store and retrieve information?
 
Joe Ess
Bartender
Posts: 9313
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That can be as simple as writing out your data as a text or binary file. If you want to get fancy or read the data in Excel you could use comma or tabs to seperate the fields. You can get as complex as you want. I've used RandomAccessFile to store data in fixed records and used an "id" which was the offset of the record in the file. Makes for very fast access.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic