Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to go about this...

How to go about this...

Scheduled Pinned Locked Moved C / C++ / MFC
databaseperformancetutorial
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mirano
    wrote on last edited by
    #1

    Hi everybody, I want to explore more of creating a file database on my own. I can already create a system with fixed-length records in binary format to add, delete and search through it, with file headers and manipulating at the bytes level. Now I would like to find any sources (articles, books, code...) to see how to go about creating a variable fixed records (providing the type of the value that will be stored in the record), how to internally organise the tables, how to link tables, etc... The purpose of it is to use it in some simple applications to escape the overload of bringing the MDAC, Jet and other componenets into the installation, if I am not going to need any high-performance database, but still wish to have a data storage. I searched all over the net, but could not find much details about it. Thanks a lot in advance. .

    H N C M 4 Replies Last reply
    0
    • M mirano

      Hi everybody, I want to explore more of creating a file database on my own. I can already create a system with fixed-length records in binary format to add, delete and search through it, with file headers and manipulating at the bytes level. Now I would like to find any sources (articles, books, code...) to see how to go about creating a variable fixed records (providing the type of the value that will be stored in the record), how to internally organise the tables, how to link tables, etc... The purpose of it is to use it in some simple applications to escape the overload of bringing the MDAC, Jet and other componenets into the installation, if I am not going to need any high-performance database, but still wish to have a data storage. I searched all over the net, but could not find much details about it. Thanks a lot in advance. .

      H Offline
      H Offline
      Henry miller
      wrote on last edited by
      #2

      You have two choices, either an index of fixed length records that shows where everything is and how big it is, or start each structure with a field that says how long it is. I recomend both, that way if something gets corrupt you can use the other to recover most data. If you sprinkle "magic numbers" in there - something that is unlikely to be real data, you can start from any magic number and recover the rest of the file. (this might require someone to manually read the file) You will have to decide how important the data is, and compare that to the increased disk space. Don't forget to consider checksums to verify the data. Again, something that might not be worth the cost.

      1 Reply Last reply
      0
      • M mirano

        Hi everybody, I want to explore more of creating a file database on my own. I can already create a system with fixed-length records in binary format to add, delete and search through it, with file headers and manipulating at the bytes level. Now I would like to find any sources (articles, books, code...) to see how to go about creating a variable fixed records (providing the type of the value that will be stored in the record), how to internally organise the tables, how to link tables, etc... The purpose of it is to use it in some simple applications to escape the overload of bringing the MDAC, Jet and other componenets into the installation, if I am not going to need any high-performance database, but still wish to have a data storage. I searched all over the net, but could not find much details about it. Thanks a lot in advance. .

        N Offline
        N Offline
        Neville Franks
        wrote on last edited by
        #3

        The are a number of compact DBM's around if you don't want to write one yourself. eg. SQLite is very popular. Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com

        1 Reply Last reply
        0
        • M mirano

          Hi everybody, I want to explore more of creating a file database on my own. I can already create a system with fixed-length records in binary format to add, delete and search through it, with file headers and manipulating at the bytes level. Now I would like to find any sources (articles, books, code...) to see how to go about creating a variable fixed records (providing the type of the value that will be stored in the record), how to internally organise the tables, how to link tables, etc... The purpose of it is to use it in some simple applications to escape the overload of bringing the MDAC, Jet and other componenets into the installation, if I am not going to need any high-performance database, but still wish to have a data storage. I searched all over the net, but could not find much details about it. Thanks a lot in advance. .

          C Offline
          C Offline
          cmk
          wrote on last edited by
          #4

          Just use the dbf format. The format description is available all over the net as well as source to read/write the files. ...cmk Save the whales - collect the whole set

          1 Reply Last reply
          0
          • M mirano

            Hi everybody, I want to explore more of creating a file database on my own. I can already create a system with fixed-length records in binary format to add, delete and search through it, with file headers and manipulating at the bytes level. Now I would like to find any sources (articles, books, code...) to see how to go about creating a variable fixed records (providing the type of the value that will be stored in the record), how to internally organise the tables, how to link tables, etc... The purpose of it is to use it in some simple applications to escape the overload of bringing the MDAC, Jet and other componenets into the installation, if I am not going to need any high-performance database, but still wish to have a data storage. I searched all over the net, but could not find much details about it. Thanks a lot in advance. .

            M Offline
            M Offline
            mirano
            wrote on last edited by
            #5

            okay guys, thank you very much for your help in this. I will now go to examine some of your thoughts in more details. Bye. .

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups