Re: Re: Re: Delphi multi-TList data file

Posted by webmaster Guido on April 26, 2001 at 17:55:23:

In Reply to: Re: Re: Delphi multi-TList data file posted by eeleong on April 18, 2001 at 16:04:19:

: Thank you for you reply.

: I understand your suggestion but I really donít know how to implement it.(method b &c) ( I am very new in Programming.)

: So I hope you can suggest some website/online-resources/reference I can study or suggest to me in what direction how can I find the information.

Well, you are trying to set up some database system "from scratch" ;-) and I think that you will not find all the info in one place. It's not just a well defined small problem, but the full development of a complicated storage and retrieval system...

Just an idea: if you can convert all of the properties of your items to strings (text format), you can store this as a text-file. Text files are a lot easier to read and write: look up how easy it is to save/load the lines of a TStringList using text-files.
Think of a file with lines like this:

object_id: 0
  data_size: 1085 1085 bytes are data for this first object...
obj_name: XYZ
  ...and so on...
object_id: 1
  data_size: 580
object_id: 2
When storing and reading works, set up the rest of the system. Later on, eventually you could try to save and read the data in a more condensed form, as a binary data file. Only the conversion routines have to be changed then, the applications "I/O interface", while the rest stays unchanged. If that last step turns out too complicated, you still can continue with your text-based storage. With the speed of nowadays PC's and disk drives, you won't see much of a difference, unless you work with very large files (megabytes).