Data structure to be used ???
-
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."
-
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."
Have you considered the
CRecordset
andCDatabase
classes?
A rich person is not the one who has the most, but the one that needs the least.
-
Have you considered the
CRecordset
andCDatabase
classes?
A rich person is not the one who has the most, but the one that needs the least.
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."
-
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."
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.