开发者

Good in-memory database for .net/PowerShell?

开发者 https://www.devze.com 2022-12-17 21:15 出处:网络
If I have a script that handles state information that\'s a bit mo开发者_Go百科re complex that can be stored in variables, what\'s the best option for a small in-memory database?

If I have a script that handles state information that's a bit mo开发者_Go百科re complex that can be stored in variables, what's the best option for a small in-memory database?

Sqlite is an option, though that would be an external dependency. XML might do, though it's non-relational.

Is there any consensus on a tool for this job?


Considering PowerShell's great support for scripting .NET, how about using an ADO.NET DataSet.


For small data ( less then few GBs ) you can use a RAM disk, and use any usual storage ( SQ DB, NoSQL DB, or even a text file), to store data, as usual.


Now in memory database is available in Microsoft.Data.Sqlite:

https://learn.microsoft.com/en-us/dotnet/standard/data/sqlite/in-memory-databases


If you need to persist the data across session, consider using SQL Server Compact Edition. I have used it for a number of smallish .NET projects and it generally works like a small, single user SQL Server.

http://www.microsoft.com/sqlserver/2008/en/us/compact.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消