遗留应用程序使用什么数据库技术?
我正在寻求建议。我知道 stackoverflow 喜欢“可回答”的问题,我希望是这样。
我有一个大型遗留(Windows)应用程序,使用专有(ISAM)数据库。我希望研究将其转移到使用 SQL 数据库:主要是 MS SQL Server,我不介意 Oracle 的灵活性,但这只是“那就太好了”,并且可能不会对决策产生太大影响。
该应用程序是用 C/C++/MFC 编写的,非托管。在这个阶段,我非常希望能够“构建”初始解决方案尝试的“原型”。我希望这不要太复杂,如果整个过程看起来有进展的话,它可以被完善。
我看到的候选者是:
- ODBC
- OLEDB
- ADO.NET
我想我已经了解到现在我应该更喜欢 OLEDB 而不是 ODBC。我知道 ADO.NET,但不知道其他的。但是,ADO.NET 将要求我使用应用程序中的 .NET/CLR/托管代码,但目前还没有这样做。
有什么建议可以走哪条路吗?原型设计的速度/简单性将受到赞赏,但显然如果我知道最终的解决方案将需要不同的访问方法,那么从另一种方法开始可能是愚蠢的。 (我希望不要建议我重新设计/重写整个应用程序。)
I am looking for advice. I know stackoverflow likes "answerable" questions, I hope this is.
I have a large legacy (Windows) application, using a proprietary (ISAM) database. I wish to investigate moving it over to using a SQL database: primarily MS SQL Server, I wouldn't mind Oracle flexibility but that is only a "would be nice", and probably shouldn't influence the decision much.
The application is written in C/C++/MFC, not managed. At this stage I am looking very much to "prototype" an initial solution attempt. I would like this not to be too complex, it can be refined if the whole process looks like it's going somewhere.
The candidates I see are:
- ODBC
- OLEDB
- ADO.NET
of which I think I have learnt that nowadays I should prefer OLEDB over ODBC. I know ADO.NET but not the others. However, ADO.NET is going to require me to use .NET/CLR/managed code from the application, which it doesn't do at present.
Any advice for which way to go? Prototyping speed/simplicity would be appreciated, though obviously if I know the final solution will require a different access method it might be silly to start with another one. (I would appreciate not being advised to redesign/rewrite the whole application.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不会使用 ADO.NET,除非您打算将所有内容切换到托管代码(这听起来不太可能)。
剩下 ODBC 和 OLEDB。
ODBC 是一个开放标准,但是OLEDB 是一种更现代的设计。考虑到你的程序不太可能离开 Windows,我建议使用 OLEDB。
注意:您使用的实际数据库对此决定并不重要。以上所有内容都对 SQL Server 和 Oracle(以及在更有限的程度上 Sybase、DB2、UDB 等)提供了很好的支持。
I wouldn't use ADO.NET unless you intend to switch everything to managed code (which sounds quite unlikely).
That leaves ODBC and OLEDB.
ODBC is an open standard, but OLEDB is a more modern design. Considering your program isn't likely going anywhere off Windows I would suggest OLEDB.
Note: The actual database you use shouldn't matter much in this decision. All of the above have great support for SQL Server and Oracle (and to a more limited extent Sybase, DB2, UDB, etc).
我推荐 ODBC,因为它有相当简单的 API 和对象模型。 OLEDB 更复杂并且需要陡峭的学习曲线。
如果您要从头开始完全重写,我建议使用 ADO.NET,但对于遗留迁移,您会希望保持简单。
I would recommend ODBC as it has a fairly simple API and object model. OLEDB is more complicated and requires a steep learning curve.
If you were doing a complete re-write from scratch, I'd recommend ADO.NET, but for a legacy migration, you'll want to keep it simple.