For the existing application that uses the MS SQL server, is it possible to implement a C# functionality that would be mapped as an SQL table?
In other words, can a C# functionality be queried from a legacy SQL query so that it acted as if the SQL table was there?
The motivation: I have blobs with heavily compressed data (archived as files elsewhere). I would like to replace the huge existing SQL table so that the data would be extracted from the archive in the background.
Think as if the SQL table was a cache memory that could be queried as a normal table. When there is a cache miss, the data is extracted by a C# code to fill the missing data in the cache, and only then the real SQL query is performed.
The operation is not time critical. This way even a simpler solution is acceptable -- when the SQL query appears, the arguments are somehow passed to a C# function that fill the empty table with the extracted data, and then the SQL query is performed and the data is returned.
Is anything like that possible at MS SQL server?