No announcement yet.

custom database advise

  • Filter
  • Time
  • Show
Clear All
new posts

  • custom database advise


    I was wondering if someone could point me in the right direction
    in regards to database storage and how it works. For the project
    i'm working on it would be best to write a custom database rather
    than pre made one. I have been scratching my head about database
    storage and what is the "best" way. The "best" way of course would
    depend on the sort of data and its size I bet...


  • #2
    If your data is not too complex, you could store it in flat files; straight ASCII, with each line being a separate record.
    Otherwise, Databases are opened in binary mode. There is a pre-header that gives the date of last modification and the size of the header, then there is a header that gives:
    .The number of records in the file,
    .The length of a record,
    .The number of fields,
    .The data type and length of each field.
    Then follows each individual record. The most famous file format for pre-windows databases is the dBaseIV file format. Ethan Winer's Basic book contains a set of routines for interacting with dBase files. One of the first programs I wrote for windows (last November) was a dBaseIV file viewer. One of the Include files is a set of dBaseIV manipulation routines. The source is available for anyone interested.

    Hope that this starts your questions off in the right direction.

    [email protected]
    :) IRC :)