How does Smalltalk work with databases?

I am using Squeak4.1. How does it handle database connections? Does it provide something like ODBC / ADO in .NET or J2EE?

What packages are related to database operations?

Can someone give me some advice?

+4
source share
4 answers
+5
source

If you need something that really is an analogue of ODBC / JDBC or ADO.NET, then the closest analogue will be SqueakDBX, a common, FFI connector for a wide range of databases . While he uses FFI, developers have gone to great lengths to ensure that lengthy operations do not block the virtual machine. Although I can’t honestly say that I used it in production, the reviews were positive, it supports a very wide range of databases (MySQL, Microsoft SQL Server, PostgreSQL, SQLite3, etc.), and it is actively developing, so this is probably good bet.

Historically, the downside of SqueakDBX is that you did not get GLORP, the main ORM used in the Smalltalk world these days. The good news is that this is no longer the case: SqueakDBX now has GlorpDBX , which brings GLORP to SqueakDBX. Drivers are currently available for PostgreSQL, MS SQL, and MySQL. If you need to connect to a traditional database, this is probably the best choice.

+5
source

Benjamin: We have already begun modifying Glorp, we call it GlorpDBX, and now Glorp works with a generic database driver, including the GlorpSqueakDBX driver. Right now we have GlorpDBX working with SqueakDBX for Postgres, MSSQL and Oracle.

Greetings

+2
source

You may not need it. If your smalltalk code is running in Gemstone, you don’t have to worry about database connections and queries before you have a lot of data / many transactions. And if the number of objects is very small, SandstoneDB is much easier to use. You can find links on the Marine Conservation page.

+2
source

Source: https://habr.com/ru/post/1341070/


All Articles