Thoughtful, detailed coverage of the Mac, iPhone, and iPad, plus the TidBITS Content Network for Apple consultants.

Relational Databases and Mac OS X, Part 2

As Mac users confront the geeky realities associated with Unix as the core of Mac OS X, they may not be aware of their newly acquired capability to run powerful relational database software. In part one of this article, I discussed the basics of how relational databases work (see TidBITS-580). This week, I want to cover some commercial and open-source databases currently available for Mac OS X.


As with last week's release of FileMaker 5.5 with support for Mac OS X, most of the databases that run under the Classic Mac OS will be ported to Mac OS X. However, we're also seeing an influx of newly available database programs. All of these databases have been around for years on different platforms; it's only with Mac OS X that Mac users can finally run them.

It's worth noting that, for the first time, the Mac OS finally pulls even with, if not ahead of, Windows in terms of database power. Although the Macintosh world still lacks a friendly low-end SQL database like Microsoft Access, the quantity and quality of databases available for Mac OS X is incomparable, especially if Oracle climbs aboard.

Also keep in mind that none of these databases are meant to be used directly for day-to-day data entry and queries like FileMaker or 4D. MySQL and PostgreSQL are command-line driven databases, while FrontBase and OpenBase provide only rudimentary data input and retrieval interfaces. Instead, these back-end databases work behind the scenes and are meant to be coupled with some sort of front-end interface, be it a Web page or a desktop application.

MySQL -- MySQL is the most popular open source database, and unlike many databases, MySQL will handle large bodies of text, making it suitable for Web publishing and messaging systems such as those found on Web forums. On the down side, MySQL doesn't embrace ACID (Atomicity, Consistency, Isolation, and Durability, as we learned in the first part of this article). Transaction support was added only recently, and it is rather bolted-on (MySQL transactions lock entire tables). ACID needs to be built in from the ground up. The lack of transaction support used to give MySQL a speed advantage, but PostgreSQL has been proven comparable to MySQL in many tasks.

< tim20001112.php3>

Finally, although MySQL supports online backups, it locks the database from updates (though not read-only accesses) while performing the copy. Online backups enable you to back up your database while without having to shut it down entirely.

Bottom Line: MySQL is free and well suited for content-oriented systems, but for traditional business uses I'd go with PostgreSQL or FrontBase.


PostgreSQL -- PostgreSQL is probably the best open source database. It supports transactions, which makes it suitable for serious business use. It offers online backups, and unlike MySQL, will continue to process database updates during backups. PostgreSQL's previous weakness of an 8K row-size limitation has mercifully gone away in version 7.1.

PostgreSQL still suffers from the need to "VACUUM" the database routinely. VACUUM is a PostgreSQL-only, non-standard SQL command which generally cleans up a database. The VACUUM command can be time consuming (15 minutes is not uncommon), and locks out any use of the database while running. You also don't have the option of simply letting the database get dirty - PostgreSQL will start failing mysteriously if you don't VACUUM regularly. Different situations call for different VACUUM frequencies, but some folks perform the operation once a week, while others do it every hour.

Bottom Line: PostgreSQL is free and is the best open source database for running businesses on Mac OS X.


FrontBase -- I really like FrontBase. Like PostgreSQL, it supports SQL92 (the latest version, circa 1992, of the international SQL standard). Each database resides in one file, making database file identification and transport a breeze. It supports online backups, clustering (the capability to have two or more machines share a database and hand off connections to one another, increasing reliability and speed), and offers raw disk support (bypassing file system overhead).

It strongly embraces ACID, requiring you commit almost every change to the database. It sports a graphical administration tool on Mac OS X and X Server, while the engine itself runs on many other operating systems (Windows NT/2000, Linux, LinuxPPC, etc.). It offers a Web-based administration tool as well. On Mac OS X, it uses the standard system Installer, which is graphical and friendly.

Unlike MySQL and PostgreSQL, FrontBase is not open source. However, there are two free FrontBase licenses. The first, the developer license, enables all of FrontBase's features for six months (renewable), but doesn't give you deployment rights, so you can't let anyone else use your database. The second free license allows deployment but doesn't allow hot backups, clustering, or external connections to the database (defined as remote connections over a network; CGI or WebObjects connections from the same machine are fine) . There's a $999 license that allows external connections and hot backups, and a $3,499 license adds clustering.

FrontBase makes it easy to import your data, including instructions and tools to convert existing databases from FileMaker Pro, MySQL, OpenBase and Sybase. I can personally vouch that the FileMaker Pro tool works as advertised. With the converter, FrontBase plus WebObjects makes an attractive path for FileMaker Pro developers who need more power.

There are two drawbacks to FrontBase. The first is that you must enter a license number after installing the software. This isn't bad in itself, however the license is tied to your machine's IP address and won't work with DHCP (which may provide your Mac with a different IP address on every restart). That can make it tricky to run FrontBase on a travelling PowerBook or a Mac on a DSL or cable modem connection that requires you to use DHCP.

A FrontBase representative informed me this is because Mac OS X Server doesn't allow software to retrieve the computer's Ethernet MAC address without running under the root account. Since FrontBase didn't want to force their users to run FrontBase under root (a bad security idea), they went with what they could access: the IP address. The desktop version of Mac OS X changes that, and FrontBase will tie the license to the MAC address in the future.

FrontBase's second drawback is that the company doesn't offer on-site support. Although FrontBase requires little administration and their email support is quick and competent, this could be a deal breaker for some companies.

Bottom Line: FrontBase is the least expensive commercial high-end database for Mac OS X, but you can't get on-site support.


OpenBase -- OpenBase wins the user interface contest hands down. Its interface is elegant and beautiful, and it contains a reasonable modeling tool which graphically depicts how your database is structured. For example, it represents tables as rectangles and draws lines between them to illustrate their relationships.

OpenBase's engine seems fast, modern, and powerful. Like FrontBase, OpenBase offers a free developer license and supports online backups. A $295 migration tool called ClickConvert helps move data from existing FileMaker Pro databases.

OpenBase's beauty comes from Mac OS X's Cocoa environment, which limits OpenBase's platform support. It supports Mac OS X and X Server out of the box; however to run OpenBase under Solaris or Windows 2000, you first must purchase and install WebObjects (which brings the Cocoa frameworks along with it). Granted, WebObjects has fallen greatly in price recently, however it still adds $700 to OpenBase's $2,000 price. OpenBase's graphical interface is being rewritten in Java, so its future platform support should increase. Alas, technical support is only offered via email.

OpenBase is pricey, but there's new hope for those with tight budgets. While we were preparing this article for publication, OpenBase introduced a new $499 license specifically for use with PHP, a popular tool for linking databases with Web sites. This lower price comes with two restrictions: no external connections (like FrontBase's free deployment license) and no support for WebObjects (unlike FrontBase). However, it does allow online backups, a feature which starts at $999 for FrontBase.

Bottom Line: Ironically, the database with the highest starting price is the best for high-end relational database newbies. If you're a highly paid consultant or need to get a database up quickly, OpenBase's easy user interface may justify its high price.


Oracle? There have been consistent rumors that Oracle will be ported to Mac OS X. Technically, I don't see any reason they couldn't do it. Oracle already runs on a couple flavors of Unix, and Larry Ellison sits on Apple's board of directors.

Many people feel Oracle on Mac OS X will legitimize the platform, and there's logic to that argument. Oracle is known for its power, flexibility and support. However, it is also extremely expensive and complicated, to the point where many people devote their careers to nothing but administrating Oracle databases.


Making the Choice -- For the budget minded, FrontBase's free development and deployment licenses are tough to beat. If you can't spare a dime, but require online backups, then PostgreSQL is your best choice (despite its less-friendly user interface). If elegance, ease of use or speed is important to you, I'd definitely recommend checking out OpenBase. Assuming it ends up being ported to Mac OS X, Oracle would make sense only if you're developing a truly large, complex, or fast database with other peoples' money.

Now that we've looked at what makes a relational database and some of the primary contenders, be sure to look for my upcoming article on a program that brings relational databases back into the forefront of computing: Apple's powerful WebObjects.

[Jonathan "Wolf" Rentzsch is the embodiment of Red Shed Software, and runs a monthly Mac programmer get-together in Northwest Illinois.]


Try productivity tools from Smile that will make your job easier!
PDFpen: PDF toolkit for busy pros on Mac, iPhone, and iPad.
TextExpander: Your shortcut to accurate writing on Mac, Windows,
and iOS. Free trials and friendly support. <>