All the World's A Database

Dr. Dobb's Journal January 2000

By Jack J. Woehr and Lou Grinzo

Jack is a DDJ contributing editor and can be contacted at jax@well.com. Lou is a freelance programmer and writer. He can be contacted at lgrinzo@stny.lrun.com.


An Introduction to Database Systems, Seventh Edition
C.J. Date
Addison-Wesley, 2000
974 pp., $64.95
ISBN 0-201-38590-2

MySQL & mSQL
Randy Jay Yarger, George Reese, and Tim King

O'Reilly & Associates, 1999
487 pp., $34.95
ISBN 1-56592-434-7

The 25th anniversary edition of C.J. Date's An Introduction to Database Systems is the seventh update of this classic computer-science textbook. Disdaining only low-level details of database physical layout (while admitting its significance), the book surveys relational databasing as completely as possible in a single, large volume.

Date has been immersed in databasing since the mid 1960s. He worked for IBM from 1967 through 1983. He currently lectures, writes, and consults on relational databases.

An Introduction to Database Systems, Seventh Edition, is a fine, readable summary of the entire field. It conveys intelligently its own domain. It also tours the byways of relational calculus, encryption, and other subjects in a fashion as engaging and informative as treatments by noted experts in these neighboring domains.

The book is like a university lecture. It's written in beautiful English. The speaker carefully leads us forward over the terrain, meticulously and discreetly reminding us where in the text he has explained a subject that might have slipped our memory upon reaching the current point in the discussion. His explanations are well reasoned, accessible, and semantically precise.

An Introduction to Database Systems has merits that transcend the field of computer science. It is a literary monument to clear thought and intellectual analysis as practiced in our discipline. Impervious to fad and fashion, it is yet fully resident in the modern world. Date is up-to-date on the database systems encountered in the workplace. Although he generally avoids naming specific products, he knows their strengths and weaknesses, indicating the questions that should be asked about any prospective development and operational platform.

The book is accompanied by copious accurate diagrams, numerous thought-provoking exercises, chapter-by-chapter bibliographies, several useful appendices, and an excellent index. An Introduction to Database Systems is computer-science publishing at its best.

-- J.W.

In the ever-growing arena of Linux application software, one category that has received a great deal of press over the last year has been that of commercial database management systems (DBMS). A casual observer would be forgiven for thinking that before Oracle, IBM, and their friends came to town, Linux had been bereft of serious database offerings. Forgiven, but wrong, of course, since Linux has had numerous such packages available for years -- the two most notable being MySQL and mSQL. The book MySQL & mSQL, by Randy Jay Yarger, George Reese, and Tim King, discusses this fact.

Addressing even a single DBMS in a book can be a daunting task, but the authors make their chore even more difficult by mixing tutorial and reference material. They attempt to cover database basics, program-specific details of installation and use, and programming topics, as well as provide an extensive reference for programmers working with these two programs. That's a lot of territory to fit into fewer than 500 pages, but the book succeeds surprisingly well.

MySQL & mSQL is organized into three sections: Getting Started with MySQL and mSQL (seven chapters, 120 pages), Database Programming (seven chapters, about 110 pages), and Reference (eight chapters, about 260 pages).

Their introduction to RDBMS concepts and database design provide good, useful material, but they're both very brief. In Chapter Two, for example, they develop a design for a music database, starting from a very naive model, applying intelligence, and evolving it through several iterations. This is an excellent, time-proven way to illustrate abstract concepts, and it works well here. I noticed, however, that the authors overlooked the possibility of multiple artists collaborating on a single song, and that they didn't distinguish between a song and a performance of that song. These sound like petty complaints, but this situation is representative of the book, in that the authors often take on difficult tasks with generally satisfying results, but with a few nagging details left hanging.

The first section also offers a good overview of MySQL and mSQL, including a bit of history about each. The authors explain how to acquire and install the programs, describe some of the third-party programs available for each, and provide numerous web addresses. In the final chapter of the section, they talk about other database programs that are similar in size and capability to MySQL and mSQL.

The second section takes you on a whirlwind tour through database programming in general: CGI, Perl, Python, PHP, C/C++, and Java. The authors do a quite respectable job and use a good mix of sample code and prose. I was surprised that they provide source in HTML and other languages without showing screen shots or the results. Perhaps this is just a sign of how picture-oriented programmers have become, but I found it a little curious and somewhat unsatisfying that they would include that much detail without showing the fruits of their labors.

Obviously, they don't even attempt to teach you how to use all these languages, but they did write their examples in a very simple and clean style. People with a passing knowledge of these languages should have no trouble at all following the chapters in this section.

With the final section, the book shifts from a tutorial to a reference. The chapters here include: SQL, MySQL, and mSQL System Variables, MySQL and mSQL Programs and Utilities, PHP and Lite Reference, C Reference, Python Reference, Perl Reference, and JDBC Reference. The language-specific chapters focus on the APIs for dealing with the two database programs, and they show a little unevenness. For example, the chapter on JDBC uses a format familiar to Java programmers for presenting each class in the API, listing the superclass, immediate subclasses, the first availability of the class, and so on. But the treatment of the other languages isn't as regimented, and the reference leaves too much to the imagination overall. For example, there's little discussion of error return values and the exact behavior of APIs in some not-so-hard-to-imagine circumstances. Given the kind of bullet-proof code that programmers are often called on to write when using databases, this is a real problem -- and another area where the book left me wanting more than it delivered.

I don't want to leave you with the impression that this is a bad book or that it's the work of lazy authors. On the contrary, MySQL & mSQL is a very good introduction to and overview of MySQL and mSQL, particularly for programmers. My biggest wish for the next edition is that the authors either narrow the focus of the book, or expand the contents of the first edition to match their vision.

-- L.G.

DDJ