Slashdot Mirror


MySQL Cards and Charts

Michael J. Ross writes "Database programmers using MySQL frequently have a need to verify the name or parameter list of a MySQL function, or to check a statement or the data types available within its implementation of SQL. This typically occurs when the programmer is caught up in a coding session, and would much rather not break their creative flow by searching Web sites for the needed information, or stepping away from their computer to hunt for a reference book. In these cases, nothing could be more valuable than a concise summary of all SQL statements and MySQL functions, in a form compact enough to be kept within reach on the desk or tacked up to the nearest wall space. This is the goal of the VisiBone MySQL Cards and Charts." Read on for the rest of Michael's review. MySQL Cards and Charts author Bob Stein pages 4 publisher VisiBone rating 10 reviewer Michael J. Ross ISBN N/A summary High-quality reference materials for MySQL functions and SQL statements These two products contain the same information, with the same formatting and color coding. They differ primarily in their construction, sizes, and likely destinations. The MySQL Cards — often referred to as cheat sheets — are 8.5 by 11 inches in size, made of card stock that has been laminated on both sides of each pair of cards, for a total of four pages of information. The MySQL Chart is 24 by 33.3 inches, printed of course on only one side. The VisiBone Web page devoted to these products notes that the cards have the advantage of portability, while the chart has the advantage of presenting all of the information in one glance. (The Web site fails to mention that the large chart has the additional advantage that it can be used to cover blemishes on a wall, such as those caused by a Web programmer banging his head against it when wrestling with browser incompatibilities.)

The March 2007 edition of the cards and chart cover MySQL version 5.2 and ISO/ANSI SQL 2003 specification. Such a tremendous amount of technical information needed to be packed into relatively small form factors, offering limited space — especially compared to books. Consequently, all of the available space had to be used judiciously. That is precisely what Bob Stein, principal of VisiBone, has accomplished with these items. Each one diagrams the syntax for 84 SQL statements and 236 MySQL functions and operators. In a private communication, Mr. Stein noted that no fewer than 194 of MySQL's 225 reserved words are included. (Of the remaining 31 reserved words, 7 are apparently not used anywhere in MySQL, 13 are quite obscure, and 11 are functionally synonymous with other terms — mostly column types from other database engines.)

Given the small amount of space available, there would be the danger of the material being difficult to read. Fortunately, Mr. Stein utilized shades of gray, white and black, blue (to indicate MySQL statements that are not standard ISO/ANSI), and the occasional red (to indicate the most commonly needed information). He also made full use of space on the right hand side of each page, for the largest sidebars, and the remaining space in the middle, for more modestly sized topics. Lastly, he chose a readable type size of 9 points.

The MySQL Cards present the SQL statements and MySQL functions separately, each on their own cards, in alphabetical order. The SQL statements are less horizontally linear and more diagrammatic, to indicate alternative and optional keywords. For each function, the return data type and parameters are given, as well as a pithy summary of what the function does, or an illustrative example. There are a total of 182 examples of the functions and operators, all tested.

The MySQL Chart includes the identical information provided by the cards, but with all of the SQL statements listed down the left-hand side, and all of the MySQL functions down the right-hand side.

Reviews of technical materials oftentimes focus exclusively on the product itself, with no mention as to its delivery. That might make sense for a technical book that could be ordered, packaged, and shipped from any one of many online bookstores, or purchased in person at a local bricks-and-mortar bookstore. In contrast, these MySQL products, like all other VisiBone products, are packaged and shipped from the company's only location, in Brunswick, Maine. The smaller size of such an operation allows for greater attention to each individual shipment. Furthermore, the cards are mailed in sturdy cardboard flats, with directions not to be bent. Charts are mailed in double-hulled cardboard tubes that are even more sturdy.

It is rare that one encounters such excellent products in the fast-paced world of technical publishing. However, I can offer just two minor suggestions for improvement. Even though the color choices generally work quite well, the medium gray used as the background color is probably not the best choice, since almost all of the text is in black. A lighter shade of gray — perhaps that used for a couple of the sidebars, such as "GROUP_CONCAT()" — with a corresponding change in those sidebars, would make the text stand out more.

The only other weakness I found was the use of the term "Habitat," as an adjective for "Shell," "PHP," and "Web Browser." The meaning may be immediately obvious to those of greater intelligence than myself (not that that narrows the field), but my presumption was not confirmed until I saw mention of the term on the aforesaid Web site. The term "Sample" would be more clear.

The chart is the ideal size for a poster, and the 8.5"x11" cards work well; but if the cards were folded into two or three panels, they would be easier to stand up on a desk, and not get buried underneath papers and books.

Nonetheless, the overall quality of these cards and charts is outstanding; the information they offer is accurate, up-to-date, and neatly presented; the protective packaging was appreciated. Even the levity was a nice touch: Despite the limited unused space on the cards, Mr. Stein manages to still squeeze in a bit of humor concerning ISBN bar codes.

Looking over these materials would, for anyone non-technical, probably cause their eyes to glaze over. But for the dedicated MySQL programmer, it can be a humbling experience, largely because it reveals just how little of the language is known or used on a regular basis — by most database programmers, or, at least, by this one. Slowly perusing the information-rich pages, I found myself delighted to discover for the first time functions and statements that would allow my future MySQL code to do more natively, within uncompiled statements, stored procedures, and triggers, without resorting to performing the processing within PHP or whatever other application language will be used.

Lastly, each shipment is accompanied by a letter from Mr. Stein, in which expresses to the customer his appreciation for their order, and his genuine excitement in the potential that any developer has to use his tools to help develop something great. He makes clear that the focus of his efforts is to create "visualization technology for web designers" that will help them do their job better.

Although these items are not books, the VisiBone MySQL Cards and Charts could easily replace the typical MySQL reference book for most occasions when a question of language syntax needs to be resolved as quickly and conveniently as possible. I especially recommend the MySQL Cards, not only for the wealth of information, but for the way that it put all of it "at mental fingertip reach."

Michael J. Ross is a Web programmer, freelance writer, and the editor of PristinePlanet.com's free newsletter.

Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

8 of 79 comments (clear)

  1. Awesome by jdhawke · · Score: 3, Informative

    I have one of the wall charts up in my home office, looks great and is very handy to have as well. Great item.

  2. Creative flow...? by Nanidin · · Score: 4, Insightful

    I just read the description to where it says "programmer is caught up in a coding session, and would much rather not break their creative flow by searching Web sites for the needed information, or stepping away from their computer to hunt for a reference book." I'm sorry, but if you rely on this 'creative flow' to program, your programs probably aren't that great. Good programs aren't the result of quickly written code - they are the result of thought, design, and effort. The mysql site has great documentation. Google will fill in the gaps if you're in need. The creative portion of the programming process should be well done before the code starts hitting the screen.

    1. Re:Creative flow...? by panaceaa · · Score: 3, Insightful

      There is such a thing as programming creative flow. For instance, say you're coming up with a prototype for a new site. You just want to get in there, come up with a basic database that fits your needs, come up with a data API, and then write some dynamically generated HTML. If you've done it a thousand times before, it's just going through the motions and getting the code written. And if you're in this situation and you can't quite remember how to query for all rows within a specific month -- ya, it does slow you down a bit.

      I completely disagree with the spam article's premise that it'd be faster for me to go find a card laying somewhere on my desk, or that my creative flow wouldn't be broken by STANDING UP AND GOING TO LOOK AT A WALL POSTER, rather than going to the absolutely excellent MySQL documentation site, where I can actually cut and paste from examples. There's hardly ever a question about MySQL syntax or SQL functionality I can't get from the MySQL documentation. The only places where the MySQL developer guide lacks is in performance guidelines, but I don't expect that the spammed product does a better job on a laminated card.

  3. Why not do a review of a services documentation? by moore.dustin · · Score: 4, Insightful

    Why not review the documentation of the subject at hand before posting and trying to sell books to people when better resources are available for free? If /. posted a review of PHP/MySQL documentation , people would be able to see that they do not need to buy these books. That would help the users here save money as opposed to ripping them off so the site can get a small cut.

  4. gotta catch 'em all by Ohreally_factor · · Score: 4, Funny

    Not only is it useful, but it can be really fun, if you're an uber geek. Imagine getting together with your fellow uber geeks for a rousing game of MySQL the Gathering. (Sadly, I'm not an uber geek, just a smart ass.)

    --
    It's not offtopic, dumbass. It's orthogonal.
    1. Re:gotta catch 'em all by m0rph3us0 · · Score: 3, Funny

      The first card I will play is Silent Truncation of Data. This card renders your opponents data useless with out him knowing. Works against all known datatypes in MySQL.

      It is ineffective if your opponent had already played "Upgrade to Postgresql".

  5. Ooo, a slashvertisement! by raehl · · Score: 3, Insightful

    Database programmers using MySQL frequently have a need to verify the name or parameter list of a MySQL function

    Ok...

    or to check a statement or the data types available within its implementation of SQL.

    Still with you...

    This typically occurs when the programmer is caught up in a coding session,

    Really? I usually run into this problem when I'm watching television.

    and would much rather not break their creative flow by searching Web sites for the needed information,

    If I wrote that most database programmers would not care to spend their evening with Natalie Portman and some grits, would that make it true?

    or stepping away from their computer to hunt for a reference book.

    Yeah, because I bet all those MySQL database programmers have no idea where their MySQL reference book is. I bet they have to spend a whole 3 seconds reaching to the shelf behind them, or typing 'mysql <command name>' into Google.

    In these cases, nothing could be more valuable than a concise summary of all SQL statements and MySQL functions,

    How about a beer?

    in a form compact enough to be kept within reach on the desk or tacked up to the nearest wall space.

    How about a beer on a shelf?

    This is the goal of the VisiBone MySQL Cards and Charts

    The card might make a good coaster.

    Also...

    1. State the existence of a problem. (Actual existence not necessary)
    2. State the lack of solutions to problem (Actual lack of solutions not necessary)
    3. Submit statement to Slashdot until read by lazy editor.
    4. Profit!!!

  6. Re:Why not SQL Cards and Charts? by BobSteinVisiBone · · Score: 3, Informative

    I don't understand why so many SQL references contain separate sections for different DBMSs. ... Dammit, SQL has been standardized for twenty years! Shouldn't I able to write just SQL by now? --bunratty

    You know I really intended to make a comprehensive SQL reference from the start, covering MySQL, Microsoft, Oracle and possibly Postgre. And I stubbornly held onto that goal for 80% of the project. But I gave it up for two reasons. For one, researching MySQL took so long, I knew the release would delay another year if I researched Microsoft, Oracle and Postgre as well.

    But the more compelling reason was the vast quantity of MySQL-only features. (Actually the delay was more compelling, but this incompatibility issue is a more noble-sounding justification.) Not just the quantity of unique features but their astonishing vitality (e.g. string comparison). Hardly any real world SQL application can avoid breaking with standards.

    I think it's more accurate to say "the effort to standardize SQL has been going on for 20 years" rather than it was accomplished twenty years ago. And I don't think it will feel accomplished for many years hence.

    I think there are many reasons for this long hard road, but one is that the cost/benefit of standards for SQL is unusually skewed. Getting a practical database application to work well is monumentally complex (so the benefits of advanced and intricate ad-hoc features are high). A lame database, unlike a lame rounded corner, can lose customer work and destroy goodwill (so the cost of diligent standardization can be high).

    Furthermore, SQL development is rarely concerned with more than one engine at a time. Stored procedures, and other features supporting reusable code, are going through a tortured adolescence (so the benefits of portability are still low). Finally (for reasons related to the preceding, impacting industry maturity), every dialect today has a thriving single company or community in stewardship (so the costs of flaming individuality are low).

    So as far as a cheatsheet, I don't think a universal SQL cheatsheet would be as valuable as one that presented all the powers of the specific SQL for the task at hand. MySQL came first because the most people asked for it. Especially passionately I might add.

    --
    Bob Stein, http://bobste.in