Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3940930
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:28:46+00:00 2026-05-20T00:28:46+00:00

I need to store some data in a file. FOR THE MOMENT each record

  • 0

I need to store some data in a file. FOR THE MOMENT each record (data set) consists in:

  • a string (variable length),
  • an array of integers (variable length),
  • an array of bytes (variable length),
  • some integer values.

It wouldn’t be difficult at all to save all these stuff in a binary file. However, I know for sure that (unfortunately) my data format will change in time, and I want to have the possibility to add more fields to each “record”. So, obviously my file format cannot be fixed. I suppose that the best solution will be to save my data in (DB) table but I don’t want to mess up with the big guns (SQL, ADO, BDE, Nexus…).
I need a rudimentary library (if possible single PAS file) that can do that.
Since the purpose of this is rather storing data than working with data, can it be done without a DB table?

Requirements for this library:

  • it needs to easily support more than 1 million rows
  • really lightweight
  • single PAS file if possible
  • MANDATORY: easy to install in a new machine (together with the project in which it compiles)
  • MANDATORY: in order to use it I don’t need to redistribute anything
  • MANDATORY: in order to use it the user doesn’t have to install/setup stuff
  • can be freeware/shareware
  • it doesn’t have to support SQL queries or similar advanced stuff

I use D7

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:28:46+00:00Added an answer on May 20, 2026 at 12:28 am

    I don’t think you need a database for this. If you use a database I don’t see how it solves the problem of your data structure changing.

    I personally would store to YAML format which is very easily extensible. That requires quite a bit of work linking to some LIBYAML so a very lightweight alternative would be to store to INI files. These are easily extensible whilst maintaining compatibility with old files.

    You can quite easily roll your own binary format that is extensible. What you do is you write each record to a block. Each block has a short header which includes its length.

    When you read the data you read up to the end of the block and then if you are expecting more data you simply stop reading and use default values for the data. If you have read all the data you know about but are not at the end of the block, the file must have come from a later version of your program and you just skip to the end of the block. Perhaps you warn that the file contained data which you didn’t know about.

    Extensibility is achieved by always writing data out in the same order as previous versions. Any new data goes at the end of each block.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to store some data in an ini file, and I have run
I need to store some data in a text file. The data is in
I need to store some data in a Django model. These data are not
I usually use C++ stdlib map whenever I need to store some data associated
I need to store some sensitive data by encrypting it with atleast 128 bit
I need to store some simple properties in a file and access them from
I need to store some data files for my blackberry app. These are usually
I need to store some data that looks a little like this: xyz 123
I am writing my first real applet and I need to store some data.
I need to utilize the Cache object in ASP.NET to store some data with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.