I have Firebird DB table with with fields (FK - ForeignKey Fields):
ID integer,
FACILITY_ID integer, --FK
SERVICE_ID integer, --FK
PROVIDER_ID integer, --FK
SELLER_ID integer, --FK
TARIFF_GROUP_ID integer, --FK
DATE_START date,
N_NORMATIVE_VALUE numeric(15,2),
N_METER_VALUE numeric(15,2),
T_NORMATIVE_VALUE numeric(15,2),
T_METER_VALUE numeric(15,2),
IS_ACTIVE smallint
I want to load this table into memory and work with it in my Delphi program (readonly). And I have to search records by all of FKs (.... where FACILITY_ID = :FACILITY_ID and SERVICE_ID = :SERVICE_ID etc..)
What is best container for that task: dynamic array or lists or something else? And how to implement this search? Hash maybe?
It's not very large table (1000 records), but will be used inside FOR construction with more than 100000 iterations.
And i'm using Delphi XE2 with IBX & UIB & FB25
TClientDataSetand useFilterproperty (to filter records) orLocatemethod (to locate records). - kobikTClientDatasetis in memory data set. (or any other TDataSet with client side cursor for that matter) - kobik