open.itworld.com
  Search  
Security Home Page Security Webcasts Security White Papers Security Newsletters Security News Open Topics Careers ITworld Voices ITwhirled The Security site of ITworld.com

Book Review: Head First SQL

ITworld.com 10/18/2007

Sandra Henry-Stocker, ITworld.com

Send in your Unix questions today! | See additional Unix tips and tricks

If you want to really enjoy reading a technical book or learning a new computer skill set, you just have to check out O'Reilly's "Head First" series. These books fully earn their "brain-friendly" subtitles. Chock full of humorous graphics, highly visual ways of presenting data and very effective easy-to-follow lessons, these books are a hoot and a good deal at the same time.

On this topic

This year's "Head First SQL" by Lynn Beighley follows in the Head First tradition set by such masterpieces as "Head First Design Patterns", "Head First Servlets and JSP" and "Head First HTML with CSS & XHTML". While tackling a very serious technical subject, it does so with examples and text that makes it fun.

"Head First SQL" features twelve chapters. The subtitles alone give you a feel for the mildly irreverent tone of each chapter.

The SELECT Statement: Gifted data retrieval

DELETE and UPDATE: A change will do you good

Smart Table Design: Why be normal?

ALTER: Rewriting the past

Advanced SELECT: Seeing your data with new eyes

Multi-table Database Design: Outgrowing your table

Joins and Multi-table Operations: Can't we all just get along?

Subqueries: Queries within queries

Other Joins, Self Joins, and Unions: New maneuvers

Constrains, Views, and Transactions: Too many cooks spoil the database

Security: Protecting your assets

Let's hone in on one chapter -- Advanced SELECT. This chapter starts with an example of a video store with a reshelving problem. Videos may end up in any of a number of places in the store depending on who reshelves them because the database used to categorize the store's video collection has problems. More specifically, the videos may fall into more than one category, none of which mandates a particular shelf. It then walks the reader through a redesign of the database, including notes jotted along the sides of code displays, scratch pad areas in which the reader can try his own hand at crafting some code and some highly relevant thoughts in the "there are no Dumb Questions" section.

Next, the chapter tackles the issue of alphabetical order within each category, adding an "ORDER BY" clause to the slowly improving SELECT statement and then asking the reader what can be removed to make the query more powerful. And, at this point, we're still not halfway through the chapter. It continues to cover many other important attributes of the SELECT command.

Another chapter, 12, could hardly cover a more serious issue -- security, walks the reader through adding users and setting up access rights or "grants". In examples and exercises, it asks the reader to think through the access rights needed by each user and to understand how these rights are granted with the SQL GRANT command. It explains many variations on the GRANT command as well as REVOKE commands for removing privileges given in error or no longer needed. It also discusses the problems associated with shared accounts and how to use roles to best manage user accounts.

Jammed with exercises, thoughtful questions, cartoons and side comments that make you giggle while making an important point, this book provides the most enjoyable way to learn SQL than I can imagine -- well, short of learning it pool side in the Bahamas anyway. It even includes crossword puzzles to help the reader quiz himself on what he's learned. If you want to have a fun time learning SQL, this is the way to do it. It gets down to hardcore SQL and keeps you thinking not just about what you're doing, but why you're doing it with its lively examples. This is gain without the pain. This is a fun way to learn.

Sandra Henry-Stocker has been administering Unix systems for more than 18 years. She describes herself as "USL" (Unix as a second language) but remembers enough English to write books and buy groceries. She currently works for TeleCommunication Systems, a wireless communications company, in Annapolis, Maryland, where no one else necessarily shares any of her opinions. She lives with her second family on a small farm on Maryland's Eastern Shore. Send comments and suggestions to bugfarm@gmail.com.




Sponsored Links

Sign up for a Microsoft Dynamics® CRM WEBCAST
Hear globally recognized leaders in customer strategy discuss the importance and evolution of CRM.
Sun Microsystems' - FREE 60 DAY TRIAL OFFER!
Test Sun's Newest Servers BEFORE YOU BUY. Plug Them In With Access To Full Technical Support.
100% Web Based Help Desk Software
Easy to use, customizable to meet your needs, powerful and scalable. Free online demo. Try it today!
Sign up for a Microsoft Dynamics® CRM WEBCAST
Hear globally recognized leaders in customer strategy discuss the importance and evolution of CRM.
Used and Refurbished HP ProCurve Switches
Lifetime Warranties, Professional Testing & Shipping on all HP Equipment Purchases!
» Buy a link now

Advertisements
Sponsored links
Locate Hidden Software on business PCs with this free tool
Bring harmony to your mix of UNIX-Linux-Windows computing environments
Top 5 Reasons to Combine App Performance and Security
KODAK i1400 Series Scanners stand up to the challenge
 Home   Open source  Operating systems  Unix
www.itworld.com    open.itworld.com     security.itworld.com     smallbusiness.itworld.com
storage.itworld.com     utilitycomputing.itworld.com     wireless.itworld.com

 
Contact Us   About Us   Privacy Policy    Terms of Service   Reprints  

CIO   Computerworld   CSO   GamePro   Games.net   IDG Connect   IDG World Expo   Infoworld   ITworld   JavaWorld   LinuxWorld  MacUser   Macworld   Network World   PC World   Playlist  

Copyright © Computerworld, Inc. All rights reserved

Reproduction in whole or in part in any form or medium without express written permission of Computerworld Inc. is prohibited. Computerworld and Computerworld.com and the respective logos are trademarks of International Data Group Inc.