In a world of people obsessed by turning the tiniest idea into something profitable, Dr Richard Hipp's best-known software stands out for two reasons - he actively disclaims copyright in it; and at a time when multi-megabyte installations are booming, he has a self-imposed limit on the size of his product: 250KB. And he's stuck to both aims. "I think we've got 15 kilobytes of spare space," he says of the headroom left in the code.

Thus his product - SQLite (sqlite.org), a self-contained database engine and client - now forms part of Apple's Mac OS X operating system as well as part of its Aperture photo-handling application. It is also used by Google, Adobe, Sun and a number of other big names. But he receives no royalty for the millions of copies being used by commercial and non-commercial users alike. The reason? He has placed SQLite in the public domain. It contains the note: "The author disclaims copyright to this source code. In place of a legal notice, here is a blessing: may you do good and not evil. May you find forgiveness for yourself and forgive others. May you share freely, never taking more than you give."

Unrestricted approach

It is an unusual approach, even in the open source world. Most open source code is licensed under an agreement such as the GNU GPL (general public licence), which includes terms to ensure that the software remains free. "I looked at all of the licences," Hipp says, "and I thought, why not just put it in the public domain? Why have these restrictions on it? I never expected to make one penny. I just wanted to make it available to other people to solve their problem."

SQLite is an entire SQL relational database management system, wrapped up in a single file. SQL, or structured query language, is the industry standard programming language for storing and retrieving data. Well-known SQL database managers include Oracle, IBM's DB2, Microsoft's SQL Server and Access, and the open source MySQL and PostgreSQL.

"We're not trying to compete with those other engines," says Hipp. "Our goal is not add all sorts of bells and whistles, but rather to keep SQLite small and fast. We've set an arbitrary limit to keep the footprint of the library below 250KB."

However, the application can support databases running to terabytes, including gigabyte-sized elements. Being written in C, it can be compiled to run on pretty much any operating system.

Samuel Neff is senior software engineer at B-Line Medical in Maryland, USA. He likes SQLite because it has zero configuration and installation. The code is freely available, so he can easily extend it with customisations, and its performance is excellent.

In his tests SQLite was four times faster than Microsoft's SQL Server. The comparison is unfair, though, since SQL Server is designed to serve entire networks and to support huge databases with thousands of users, whereas SQLite is mainly intended for a single user on a single machine. Even so, Neff's experience shows the benefits of using tightly coded software that does no more than is necessary.

Dr Hipp knows exactly when SQLite began. "I started on May 29 2000. It's just over seven years old," he says. He was working on a project which used a database server, but from time to time the database went offline. "Then my program would give an error message saying that the database isn't working, and I got the blame for this. So I said, this is not a demanding application for the database, why don't I just talk directly to the disk, and build an SQL database engine that way? That was how it started."

In the past couple of years SQLite has increasingly been attracting attention. Apple used it in OS X 10.4, released in April 2005, as part of Apple Mail (for its message index) and to support its Core Data services. SQLite is also built into PHP 5.0, the hugely popular open source scripting language for web applications. It is in Symbian 9.5, an embedded operating system for smartphones. The tiny database engine is also part of the new Google Gears, which enables web applications to work offline. Most recently, Adobe has announced the inclusion of SQLite in Adobe Integrated Runtime for desktop applications based on its Flash multimedia engine. "Performance is great," says Ben Forsaith, business development manager at Adobe UK. "It's open source. It's lightweight, really small and widely adopted."

So how many SQLite databases are in use? "We don't have a good way of counting it," he says, "but we're guessing it's the most widely deployed SQL database in the world."

Dedicated effort

Despite being open source, the SQLite code does not have many contributors. "I have an assistant, Dan Kennedy, an Australian living in Thailand, who contributes a lot of code," Hipp says. "He works for me, I pay him. There are some people at Google who have been contributing to the full text search capability. But Dan and I have done in excess of 99% of the code."

One of the limiting factors is that anyone contributing code must waive their copyright. "I require anyone who contributes code to sign a copyright disclaimer, and I keep those copyright disclaimers in my fire safe," Hipp says.

Is he worried about the code fragmenting into many different versions, because it is public domain? "I don't see that as a problem," he says. "Other people are free to make a copy of SQLite and fork the tree [produce alternative descendants] if they want to. So far I'm not aware of anybody doing that. If someone decides they want to, it won't hurt my feelings. But it has turned into a very complicated piece of software, and it takes a dedicated effort to keep it in good shape."

Hipp attributes much of the reliability of SQLite to his use of tests. Less than half of the program code is delivered as the database engine. The larger part consists of thousands of automated tests, which exercise the code and check that the results are as expected. "That's the real key to keeping it working well," hesays.

There is a commercial aspect to SQLite. Hipp runs a company that provides support for the application, and sells extensions for specialised features including encryption and compression. It is only a small company, despite the popularity of the software.

"It's very clear to me that if I'd had any business sense whatsoever I could have made a lot of money, but I don't," he says. "I like to tell people that we make enough to live fine in Charlotte, North Carolina. We don't make nearly enough money to live in London or San Francisco, but we don't live there so that's OK," he adds - with a touch, just a touch, of wistfulness.