c++ - Storing and Searching Large Data Set -
i'm relatively new programming in c++ , i'm trying create data set has 2 values: id number , string. there 100,000 pairs of these. i'm not sure data structure best suit needs.
the data set has following requirements:
-the id number corresponding string 6 digits (so 000000 999999)
-not id values between 000000 , 999999 used
-the user not have permission modify data set
-i wish search id or words in string , return user id , string
-speed of searching important
so i'm wondering should using (vector, list, array, sql database, etc) construct data set , search it?
the id number corresponding string 6 digits (so 000000 999999)
good, use int
, or more precisely int32_t
id
-not id values between 000000 , 999999 used
not problem...
-the user not have permission modify data set
encapsulate data within class , go
-i wish search id or words in string , return user id , string
good, use boost.bimap
-speed of searching important
i know, that's why using c++... :-)
you may want check sqlite : sqlite, can function in-memory database.
Comments
Post a Comment