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. Data structure to be used ???

Data structure to be used ???

Scheduled Pinned Locked Moved C / C++ / MFC
databaseperformancehelpquestion
4 Posts 2 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.
  • J Offline
    J Offline
    Jagadeesh VN
    wrote on last edited by
    #1

    Hi, I am creating an app, very much similar to a mini database. Now my problem is, I need to execute a QUERY on tables. There will be only a max of 4 fields in the queries WHERE clause. Then I need to filter the data based on the WHERE condition supplied. Any suggestions on what sort of data structure should I go for ? ( I can even load the whole thing into memory at startup if reqd.,since memory is not a constraint. ) "A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."

    D 1 Reply Last reply
    0
    • J Jagadeesh VN

      Hi, I am creating an app, very much similar to a mini database. Now my problem is, I need to execute a QUERY on tables. There will be only a max of 4 fields in the queries WHERE clause. Then I need to filter the data based on the WHERE condition supplied. Any suggestions on what sort of data structure should I go for ? ( I can even load the whole thing into memory at startup if reqd.,since memory is not a constraint. ) "A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Have you considered the CRecordset and CDatabase classes?


      A rich person is not the one who has the most, but the one that needs the least.

      J 1 Reply Last reply
      0
      • D David Crow

        Have you considered the CRecordset and CDatabase classes?


        A rich person is not the one who has the most, but the one that needs the least.

        J Offline
        J Offline
        Jagadeesh VN
        wrote on last edited by
        #3

        I want to develop the same in Plain C++, so that it can be ported to UNIX later. "A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."

        D 1 Reply Last reply
        0
        • J Jagadeesh VN

          I want to develop the same in Plain C++, so that it can be ported to UNIX later. "A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Since "plain" C++ has no knowledge of databases, recordsets, files, and the like, what you want, AFAIK, is not possible. In order to provide support for these, you'll need a platform-dependent API. I do not know of one for both Windows and UNIX, although it's been 15 years since I worked on a UNIX box so something just might be available.


          A rich person is not the one who has the most, but the one that needs the least.

          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