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

  • SEARCH
  • Home
  • 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 3937988
In Process

The Archive Base Latest Questions

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

I have very simply structured data which is currently stored in a home-brew file

  • 0

I have very simply structured data which is currently stored in a home-brew file format, but I am wondering whether we should migrate to something more modern. The data is simply a table of doubles, indexed by a double column. The things I need to perform are:

  • Iterating through the table.
  • Insertion and deletion of arbitrary records.
  • Selecting a given number of rows before and after a given key value (where the key might not be in the database).

The requirements are:

  • The storage must be file-based without a server.
  • It should not be necessary to read the whole file into memory.
  • The resulting file should be portable between different architectures (wrt endian-ness…)
  • Must be a very stable project (the data is highly critical).
  • Must run on Solaris/SPARC and preferably also on Linux/x64.
  • Access times should be as fast as possible.
  • Must be available as a C++ library. Bonus points for Fortran and Python bindings 🙂
  • Optional higher precision number representation than double precision would be a bonus.
  • Relatively compact storage size would also be a bonus.

From my limited experience, sqlite would be an interesting choice, or perhaps mysql in a non-server mode if sqlite is not fast enough. But perhaps a full-fledged SQL database is overkill?

What do you suggest?

  • 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:07:57+00:00Added an answer on May 20, 2026 at 12:07 am

    SQLite meets nearly all of your requirements, and it’s not that hard to use. Give it a try!

    • It’s file-based, and the entire database is a single file.

    • It does not need to read the entire file into memory. Database size might be limited; you should check here if the limits will be a problem in your situation.

    • The format is cross-platform:

      SQLite databases are portable across 32-bit and 64-bit machines and between big-endian and little-endian architectures.

    • It’s been around for a long time and is used in many places, and is generally considered mature and stable.

    • It’s very portable and runs on Solaris/SPARC and Linux/x64.

    • It’s faster than MySQL (grains of salt present behind that link, though) or other such database servers, because only one client needs to be taken into account.

    • There is a C++ API and a Python binding and a Fortran wrapper.

    • There is no arbitrary-precision column type, but NUMERIC will be silently converted to text if it cannot be exactly represented:

      For conversions between TEXT and REAL storage classes, SQLite considers the conversion to be lossless and reversible if the first 15 significant decimal digits of the number are preserved. If the lossless conversion of TEXT to INTEGER or REAL is not possible then the value is stored using the TEXT storage class.

    • Compact storage of the database, I’m not sure of. But I’ve never heard any claims that SQLite would be particularly wasteful.

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

Sidebar

Related Questions

I have a very simply subclass of UIButton that will fire off a custom
I have a very simply query like this: SELECT users.id, COUNT(others.id) as c FROM
I have a very simple table with two columns, but has 4.5M rows. CREATE
I have been using BinaryFormatter to serialise data to disk but it doesn't seem
I have a relatively large set of data that lends itself very naturally to
I am using Delphi 2009. I have a very simple data structure, with 2
Say you have a very simple data structure: (personId, name) ...and you want to
I have a very simple binary tree structure, something like: struct nmbintree_s { unsigned
I have very simple window where I have 2 buttons - one for cancel,
I have a very simple webforms app that will allow field techs to order

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.