xml 适用于 .net/PowerShell 的良好内存数据库?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2088995/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-06 12:56:16  来源:igfitidea点击:

Good in-memory database for .net/PowerShell?

xmldatabasepowershell

提问by JSacksteder

If I have a script that handles state information that's a bit more 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.

Sqlite 是一个选项,尽管这将是一个外部依赖项。XML 可能会,尽管它是非关系的。

Is there any consensus on a tool for this job?

对于这项工作的工具是否有任何共识?

采纳答案by Keith Hill

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

考虑到 PowerShell 对脚本 .NET 的强大支持,使用ADO.NET DataSet怎么样。

回答by TPAKTOPA

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.

对于小数据(少于几 GB),您可以像往常一样使用RAM 磁盘,并使用任何常用存储(SQ DB、NoSQL DB 甚至文本文件)来存储数据。

回答by Goyuix

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.

如果需要跨会话保留数据,请考虑使用SQL Server Compact Edition。我已经将它用于许多小型 .NET 项目,它通常像一个小型的单用户 SQL Server 一样工作。

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

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