Smalltalk 如何处理数据库?
我使用的是Squeak4.1。它如何处理数据库连接?它是否提供了类似于 .NET 中的 ODBC/ADO 或 J2EE 的东西?
哪些包处理数据库操作?
有人能给我一些提示吗?
I'm using Squeak4.1. How does it handle Database connections? Does it provides something similar to ODBC/ADO in .NET or the J2EE stuff?
Which packages deal with database operations?
Can anybody give me some hints?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
几个可能对您有用的链接:
Few links that might be of use to you:
如果您想要真正模拟 ODBC/JDBC 或 ADO.NET 的东西,那么最接近的模拟是 SqueakDBX,一个通用的、基于 FFI 的连接器,可连接各种数据库。虽然它使用 FFI,但开发人员竭尽全力确保长操作不会阻塞虚拟机。虽然我不能诚实地说我已经在生产中使用过它,但评论是积极的,它支持非常广泛的数据库(MySQL、Microsoft SQL Server、PostgreSQL、SQLite3 等),并且它正在积极开发中,所以这可能是一个不错的选择。
从历史上看,SqueakDBX 的缺点是您没有获得 GLORP,这是当今 Smalltalk 世界中使用的主要 ORM。好消息是,情况不再如此:SqueakDBX 现在有了 GlorpDBX,它带来了 GLORP到 SqueakDBX。目前可用于 PostgreSQL、MS SQL 和 MySQL 等的驱动程序。如果您需要连接到传统数据库,这可能是您最好的选择。
If you want something that's truly an analog to ODBC/JDBC or ADO.NET, then the closest analog would be SqueakDBX, a generic, FFI-based connector to a wide variety of databases. While it uses FFI, the developers have gone to great lengths to ensure that long operations do not block the VM. While I can't honestly say I've used it in production, reviews have been positive, it supports a very wide variety of databases (MySQL, Microsoft SQL Server, PostgreSQL, SQLite3, and more), and it's being actively developed, so it's probably a good bet.
Historically, the downside of SqueakDBX is that you didn't get GLORP, the major ORM used in the Smalltalk world these days. The good news is that's no longer true: SqueakDBX now has GlorpDBX, which brings GLORP to SqueakDBX. Drivers are currently available for PostgreSQL, MS SQL, and MySQL, among others. If you need to connect to a traditional database, this is probably your best bet.
本杰明:我们已经开始修改 Glorp,我们称之为 GlorpDBX,现在 Glorp 使用通用数据库驱动程序,包括 GlorpSqueakDBX 驱动程序。现在,我们有 GlorpDBX 与 SqueakDBX 一起用于 Postgres、MSSQL 和 Oracle。
干杯
Benjamin: We have already started to modify Glorp, we call it GlorpDBX and now Glorp works with a generic database driver, included a GlorpSqueakDBX driver. Right now we have GlorpDBX working with SqueakDBX for Postgres, MSSQL and Oracle.
Cheers
你可能不需要。如果您的smalltalk代码在Gemstone中运行,那么在您拥有大量数据/大量事务之前,无需担心数据库连接和查询。
而且如果对象数量非常少,SandstoneDB 就更容易使用。在“海边的持久性”页面上,您可以找到链接。
You might not need to. If your smalltalk code runs in Gemstone, there is no need to worry about database connections and queries before you have a lot of data/a lot of transactions.
And if the number of objects is very small, SandstoneDB is much easier to use. On the Persistence in Seaside page you can find the links.