I want to create some data aggregation elements in C #, and I would like something similar to a real-time pivot table or some kind of constant updating of the SQL query with support for select , sum , average , first , where and group-by ( where first is in the LINQ sense of "give me the first value").
For example, I might have some kind of table object called Trans with the Name , Date and Total columns, and another table called Price with the Name and Price columns, I want to create a Query instance that executes (in pseudo-SQL)
select Name, sum(Total), first(Price) from Trans, Price join on Name group by Name
and pass this to the Aggregator instance, which has links to data sources. Along with this, I want to register a callback that hits whenever the line that makes the request makes a change. Therefore, if the price for an object named "XYZ" changes, the callback will be launched with the object containing the new values ββfor this aggregated row. I would also like Aggregator be as efficient as possible, so it will have some kind of indexing scheme, so when changing values, you would not need to scan the table.
Iβm not quite sure what to call it, and I hope that I can implement something completely in C #, assuming that this is not an order of magnitude more complicated than I think. I read about Continuous LINQ and Bindable LINQ, but I could not figure out if it was suitable for this problem, or if there would be performance issues (for example, LINQ aggregations listing the entire table when the value changes).
Does anyone know of a project that is doing something like this that I can look at, or suggestions on how to create / build it myself?
edit: I have to notice that the data would not actually be in the database, it would be in memory.