Filter and find from datasets in memory

I have several medium-sized datasets in memory that I need to be able to quickly filter and find information. The data sets are small enough, so I don’t want the performance to get into the database every time I need a record, but big enough that I really need to somehow index the data.

I am currently using POCO objects with one or more dictionaries for indexing. This works great when I need to find something by a specific key, but sometimes it is not. As an example, I often need to find a record in a specific time range. And sometimes I need a record with the lowest price. Most often, requests are processed by several simple keys and one or two other fields at the same time.

Are there any tools, products, libraries (oriented to the .NET framework) that can help me? Or do I need to pick up this big dusty book, Algorithms, and start looking for search trees?

Example:

Route

  • DepartureCode
  • DestinationCode
  • Hotelcode
  • Roomcode
  • the date
  • Price

, - " 2010-03-09 2010-03-12, DepartureCode = LAX DestinationCode = NYC"

+3
2

" " " /" . SortedList/SortedDictionary ( SortedSet, .NET 4.0), , , , .

+2

DataSet.Table( "YourTable" ) . () ?

Dim myRows() as DataRow = myDataSet.Tables("myTable").Select("Date>" & _
    myBeginDate & "AND Date<" & myEndDate)

EDIT: MSDN

DataView

DataView DataTable, DataView, , RowFilter RowStateFilter . DataView, DataView , , RowFilter RowStateFilter ( DataTable). . "" DataView , RowFilter RowStateFilter .

, DataSet, , DataView .

0

Source: https://habr.com/ru/post/1736137/


All Articles