Head First SQL 210
Anita Kuno writes "On a Sunday, a fellow user-group member suggested I learn SQL. The next day, an opportunity to review Head First SQL arrived in my email.
Who was I to question? Prior to opening the couriered package, I had no knowledge of SQL, I knew databases were important, and I had seen the Head First website
once or twice. Now, I can design and create databases, use mySQL databases, and understand questions and accompanying code posted to forums. The credit goes to Head First SQL's style, which introduces
small bits of information, supported through multiple channels (such as photos with humorous dialogue, stick-men and stick-women, and input from critical
personalities whose photos and input pop up throughout the book) regular tests and exercises so the new bit of data can find a home and settle into
your memory. The regularly tested pieces of information are now in my brain so I don't have to look up
the basic stuff." Read below for the rest of Anita's review.
Head First SQL: A Brain-Friendly Guide | |
author | Lynn Beighley |
pages | xxxv & 571 |
publisher | O'Reilly Media, Inc. |
rating | 9 |
reviewer | Anita Kuno |
ISBN | 0-596-52684-9 |
summary | A beginners foundation for SQL |
Head First SQL is about RDBMS (databases) specifically mySQL (version 5.0 or newer) and includes features of other databases. The book defines a database, demonstrates how to navigate an existing database, and teaches how to create simple and complex databases, as well as how to let a database grow from simple to complex.
Foundational understanding of database construction and navigation is the focus. The target audience is those brand-new to the topic as well as those with an acquaintance with the subject and the need for a greater conceptual understanding of databases.
It focuses on the basics of databases, so the main information should remain pertinent until RMDBS get re-conceived. I think revisions, such as the reprint due out in December, will add to the strength of the book as typos and coding errors will be addressed.
The title accurately describes the contents and the subtitle "A Brain-Friendly Guide" describes the goal of the approach. The only requirements for working with the material are: a computer or access to one, the ability to identify your operating system, familiarity with downloading from the internet (links and instructions are provided in the book and the program mySQL community release is free (download instructions are given for Mac and Windows users, I believe that instructions for Linux are not included with the assumption Linux users can access the mySQL community release page and download the program without a play-by-play)), and the courage to learn a command line window user interface if you don't already know this.
Head First SQL is most useful to those who, like myself, have heard passing references to databases and other than knowing they are important have no grasp of what it is, means, or can do. Also, this will be a helpful tool for those who have some of the verbiage, enough to pass at a cocktail party, but who would feel the cold chill of horror if expected to design, construct, and implement a database in conjunction with any of their paid responsibilities.
This is the first book that I have read on the subject of databases and the first computer book that I have been able to finish. So much of the educational information about program x, language y, or application z, depends on a working knowledge of the other two variables. This is a great book for beginners. It talks about data types, it explains null, and then has null explain himself. It tells me the importance of the semicolon at the end. All basic stuff. All stuff that other books take for granted. Many times when I believed I wasn't absorbing anything, along came questions I could answer, a crossword I could complete and match-column-A-with-column-B exercises that demonstrated that I was actually learning much more than than I was giving myself credit for.
It includes illustrations, photos, clean layout, and bite sized pieces of information. All this comes from the goal of allowing both sides of the brain access to the information. It's exactly the kind of approach that I need to reinforce the terms and concepts as well as provide encouraging feedback to keep me progressing through the material. I'm also grateful that it entertains me and keeps me going back to finish the whole thing long after the first blush of excitement has worn away.
Links, to the mySQL program necessary to work with the material, are included in the book as well as a few other links in the appendices. The Head First website is a must in order to link to the forums, newsletter, blog and downloadable files to create various tables used in the book. Head First came out with a web app called Hands On SQL which I would encourage you to try. It won't work with all of the book's material but it is a good-looking tool.
You are welcome to read my submissions on the Head First SQL forum. My user name is anita. Also, the reprint that I mentioned above is due to be in stock as of December 3rd. I'm told by O'Reilly that it includes corrections for errata submitted thus far. Take a look at the Head First SQL homepage to download a sample chapter.
You can purchase Head First SQL from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Strange (Score:4, Insightful)
Re: (Score:2, Interesting)
I don't think I've ever seen a harsh review here on Slashdot. Perhaps the editors are of the opinion that a book need not be mentioned unless the reviewer thinks it's good, and since the has already been established to be good, the reviewer can go all out with hyperbole in praising it. If you want to see more critical opinions on a book reviewed here, check out the Amazon listing [amazon.com], where among the bogus reviews that often appear immediately for tech bo
Re: (Score:2, Informative)
I thought Inside XML needed editing [slashdot.org], and I certainly don't recall giving it a numeric score. Timothy probably added one just before posting it.
No, THIS is an ad for the book: (Score:5, Funny)
Head First! Apply directly to the SQL!
HEAD FIRST! APPLY DIRECTLY TO THE SQL!
Okay, I didn't say it was a good ad for the book...
Re: (Score:2)
Re:Strange (Score:4, Informative)
The Head First [oreilly.com] series is published by O'Reilly. I think it's a great series of books - even for advanced users.
Re:Strange (Score:4, Insightful)
Note for GP: Understand what you are buying when you pick up a Head First book and why or else the wealth of useful information which they contain will be lost upon you simply because you cannot get past a pre-conceived notion about the presentation.
Re: (Score:3, Interesting)
Re: (Score:2)
Re: (Score:3, Informative)
Actually, Head First Labs, the label under which the Head First series is published, is a subsidiary of O'Reilly Media Inc so the Head First series is published by O'Reilly.
who benifits? (Score:4, Insightful)
It sounds like a learn SQL in 24 hours book more than a SQL cookbook type resource, may be good for a developer who is starting out in the relational database world but I don't think DBAs will get much. At least, not from what the reviewer says.
Re: (Score:2)
What would you expect from a book called "Head First SQL"?
And a minor nitpick: a seasoned DBA should know it is MySQL, not mySQL. That will be all.
Re: (Score:2, Insightful)
Re: (Score:3, Insightful)
People, unless you have more experience with databases than "my little php page with mysql", don't touch "real" databases. You will go in with a grand idea that was avoided before by real DBAs that knew where locks, indexes, replications, transactions. backups and failovers matter. Newbies come in, create a shiny little script that makes the rest of server c
Re: (Score:3, Insightful)
And a book good for a seasoned DBA will be way over the head of a newbie. Not everyone is at the same level. Not every book should be written for 'everyone'.
Having said that...reading one book in a couple of days does not a SQL developer make.
Re: (Score:2)
Trust me, you don't need to read a book to make that happen ;-)
But back onto the topic: Of course you're right, no book will suit everyone in the audience. But, does the world really need any more reviews of "Teach yourself <insert a dicipline it'll take you a life-time to master properly> in <insert a ridiculous short amount of time>", reviewed by absolute beg
Re: (Score:2)
Reviews written by people that have read the book and are in the target audience seem like the most useful reviews possible.
Admittedly, it'd be better if we could have the beginner read the beginner-focused book, go on to have a full career in the field, and then write a retrospective review of the influence of the book on their career and beam it back in time, but absent the time machine to make the la
I noticed the lack of theory in the ToC (Score:2)
Re: (Score:2)
Re: (Score:2)
If you want to cover the DDL, then you are teaching people how to build it and theory is therefore a good thing!
Re:I noticed the lack of theory in the ToC (Score:4, Insightful)
In general, I have found that every hour of planning time spent tends to eliminate up to 10 hours of coding, and often as much as 100 hours of pre- and post-release re-engineering and bug fixing.
The goal ought to be to optimize time and expenses across the entire software lifecycle rather than cutting down on the most important places where time gets spent (on the design). This generally means spending more time on design, less on buzzword-compliance, and less on actual coding. If you do it right, testing and debugging effort go *down* as well.
Instead people end up with bloated monstrosities when better-designed products could have been built with less time an money.
Re: (Score:2)
Agreed 100%.
I'd like to add that the data the application is generating is often very valuable to the business. The costs of a bad database design are not apparent until you actually try to read the data and decipher some kind of meaning from the data as a whole. Often, the database design is so bad that the information is simply
Re: (Score:2)
Re: (Score:2)
I think it would be more accurate to say they are teaching how to (among other things) build it, but not how to design it.
Re: (Score:2, Informative)
My experience with the "Head First" series of books (I have read a few, not this one however) is that they are very good beginners books. Easy to read and easy to grasp the basic concepts of the subject they cover. Without loosing interest after a few pages (which in my experience is way too common with other books). And once you know the basics, you can go on and explore more advanced topics somewhere else.
On the other hand, once you know something about the subject, they are, well... not that good. You
Re: (Score:2)
While there's certainly overlap, there is a difference between a DBA (administering the actual database server) and an SQL programmer. This book looks like it's about SQL programming, not database administration.
Don't get in over your head... (Score:5, Insightful)
On a Sunday, a fellow user-group member suggested I learn SQL...
Now, I can design and create databases
Database design and creation isn't something you pick up over 3 days. Sure, you can make something that works very quickly, but that doesn't mean it's a good design and isn't flawed. Designing a good database structure takes experience with the tradeoffs between full normalazation and added complexity, forseeing future needs, etc.
Re:Don't get in over your head... (Score:4, Insightful)
Making DDL scripts to run in the database is easy once you learn the syntax. Knowing their interaction with each other using Foreign keys, Indexes, and planning their future growth is a completely different set of skills that's only gained with experience with your data.
Re:Don't get in over your head... (Score:5, Funny)
Dude, it's FAR more terrifying than that. From the forums on that site:
anita Joined: 07 Oct 2007
Posts: 23
Posted: Sun Nov 04, 2007 1:30 am
Post subject: CREATE a TABLE with a FOREIGN KEY
I never noticed until this evening while building a database for a customer to use with her business, but I can't seem to find the place in the book where the code for creating multiple tables from two foreign keys exists
WTF: from 'I don't know anything about databases' to 'building a database for a customer' what amount of time? We don't know when "sunday" was, but even so it seems rather abrupt given that 'anita' has only joined the forum in October and is now designing databases for (presumably) paying customers. This HOWTO book must kick serious ass.
Re:Don't get in over your head... (Score:5, Funny)
Well, she did say:
Maybe it went like this:
FFS, learn SQL!
Just a guess. :-)
Re:Don't get in over your head... (Score:4, Interesting)
It's not 'funny' dammit! It's 'customer getting taken for a ride'. The question is generated because she's using a joining table to solve a many to many between her customer and address tables and has named the constraints herself the same on each table instead of letting the system generate them. But WTF?? Address record goes to ONE customer record! If some other customer registers the same address just duplicate the %$#@ing 200 bytes of text but don't m-m it with the customer table!
Frack! Now I'm going to have to follow adventures of Anita The HOWTO Book Data Architect on that forum in the way one can't help but watch a train wreck in progress.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Jane Doe doing it for $300 (after a weekend with this book) has juuuuust enough knowledge to screw it up, and sour the coffee shop owner on future projects.
This harkens back to the days of the late 90's, when anyone who knew the acronym HTML could get a paying gig.
Re: (Score:2)
This harkens back to the days of the late 90's, when anyone who knew the acronym HTML could get a paying gig.
In the late nineties, pretty much anyone who knew the acronym HTML could design a functional web page.
Re: (Score:2)
Yes, it did, and that was my first suspicion. And the correct answer is: small shop needs an off the shelf package and not something custom made. The vendor of such can support them via call center when the occassional problem with their product comes up as well as send out regular patches. 'Anita' is going to spend ever increasing amounts of he
Re: (Score:2)
Also, I wish I could do a quick
Re: (Score:2)
I would add (Score:2)
Note I am talking about normalization as a mathematical process based on data domains, functional dependencies, etc. This means building a database which is mathematically and semantically solid rather than working on program requirements (i.e. the structure of the data in the db should *not* be based on the program's data structures but rather on the inherent internal structure
Re: (Score:2)
Granted, if you have at leas
Re: (Score:2)
For example, suppose we have an accounting application which accepts hundreds of thousands of invoices per year. After 10 years, we want to go find the balance of one busines
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Who needs books? You can learn as much as you need to know for basic web apps from Philip G. [greenspun.com] (That's a great online book, and there's another here [greenspun.com].) And he, too, is entertaining. Here's a bit comparing flat files and databases:
Re: (Score:3, Interesting)
Agreed. Some of my best DB knowledge comes about from observing what didn't work, especially as changes were accumulated over the years.
Even something as simple as an Address table (or Contact table) can have gajillion different ways to do it, and gajillion different ways
Re: (Score:2)
Where the trick comes in is designing the database so that the types of queries you will be running against it take the least time.
There are times and places where you need to create a means to "run this specific query really fast" and in that case, good relational design is not a major issue. Nothing runs faster than a sequential scan over a summary table containing the exact results you want to obtain.
However, when you do this, you prejudice all other queries. Many queries may take far longer to run, or may not be possible at all.
IMO, good, highly normalized database design is a prerequisite for good long-term performance (unless
Hmmmm... (Score:4, Funny)
Sounds like your aversage Slashdotter, doesn't it?
Re: (Score:2)
I have a question (Score:5, Interesting)
Re: (Score:2, Insightful)
Re: (Score:2)
Yeah (Score:5, Funny)
Re: (Score:2)
This review doesn't so much as mention normalization once, so the only conclusion can be the book i
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
For example, what *is* third normal form? How is it defined? You can't reasonably approach this subject without assuming that you can discuss at least basic algebra (and preferably relational algebra) with your readers. I hence got the impression that this was the non-mathematic approach to normalization which doesn't work (it is like non-math-applied physics).
Yes, it advoca
Re: (Score:2)
Well, you have to start somewhere (Score:2)
Additionally, I would highly recommend Codd's Papers, and CJ Date's books on the subject. These will help to provide a theoretical framework for understanding what an RDBMS is all about.
Re: (Score:2)
Re: (Score:2)
For the most part, SQL is an imperfect approach at writing relational algebra in plain English.
Re: (Score:2)
I take exception to that. I learned databases from a book, and have never had much trouble because of it. Of course, the book in question was The Relational Model for Data Base Management by E F Codd, but still...
Re: (Score:2)
But should it? I mean, sure, a database designer, administrator, or developer ought to know about relational database theory, design methodologies, normalization, etc. But is it necessary for a book on SQL to cover all that?
The best book on database design (in terms of covering lots of ground effectively and succinctly) I've seen doesn't cover much SQL (only eno
Re: (Score:2)
The book is most likely crap, but not for those reasons. DBAs incidentally are not theorists, they are sysadmins.
overnight experts, sigh (Score:4, Interesting)
As a database designer/developer who occasionally does DBA duties as well I initially found this quote terrifying in the extreme. But as long as this experimenting about is done on your own PC for at least the next few months, it's great that you're getting a start on a new (to you) class of software tools. Way too many people plough on using spreadsheets where they should be using at least Access. I encourage anyone with accountant or small business owning friends to pass on this review.
Re: (Score:3, Funny)
Re: (Score:2, Insightful)
Couldn't finish the review... (Score:3, Informative)
[pedantic mode: on]
Had a hard time with the blurb for that matter. if you are going to mention the name of a product several times, please learn how it's written!
MySQL
Not mySQL. For that matter, not mySQL, MYSQL, MY-SQL, or mSQL (that's another program actually)
It's all over their website [mysql.com]. Something that simple will help keep you from sounding amateurish as a reviewer.
[pedantic mode: off]
Normalization? Keys? (Score:4, Insightful)
Personally, I stand by 'Database Systems' by Connolly and Begg. Not simple, not for newbies but it coveres everything you need to know including doing ER diagrams for your structure... something every DB admin needs to do more of.
Re: (Score:2)
Normalization is as integral to databases as SQL. If you're not normalizing your databases, you might as well not have them.
Re: (Score:2)
Re: (Score:2)
You've not done real database work (Score:2)
Mental note - test locally first.
Re: (Score:2)
Re: (Score:2)
If you were doing real database work on a well run DB you wouldn't have been able to take the DB down =) Real DB's have resource limiters that allow the DBA to insure that no one user can exhaust resources to the point of taking the DB down. We even limit the percentage of system resources a user can take just to make sure that one bad report doesn't slow down OLTP processing. I'm not the DBA but I know enough to know that there are toys and then there are real business tools.
Indeed. This was a mysql database that I had previously tested long queries on. I was monitoring the progress of the query when the server went unresponsive. All hell broke out from there.
Re: (Score:2)
You haven't done real database work until you report an original bug in PostgreSQL.
Re: (Score:2)
Not the most imformative review (Score:2)
Re: (Score:2)
No normalization (some tables are not 1NF).
No RI enforcement.
No NOT NULL enforcement in critical areas (chart_id is NULL. Where did the money go? UNKNOWN!)
Ambiguous foreign keys (as in a foreign key that references any of a number of possible tables)
Dangerous abuse of data types (double precision floats for storing money)
Using custom triggers where ON DELETE/ON UPDATE events and foreign keys would be better
Perfect for a certain group (Score:2, Interesting)
However, as a DBA and DB dev myself, I know one person that I am personally going to buy this book for, maybe as a Christmas present.
My boss, of course! I spend hours per week trying to explain to him why I do things certain ways. This is because he has a slight technical background in SAP, and has just enough knowledge to be dangerous. I would love for him to read this book, i
Head first! (Score:2)
I really hate these kind of books (Score:2)
Most people I have seen using a database have not had any understanding of what they where doing and it was basically and advanced filepointer. I have seen a lot of people using MySQL with MyISAM and happily thinking they got a consistent dataset. I have seen people using databases for communication between servers and using stuff like a time stamp for identifying a row (time stamp generated on local server).
Leave databases to people
Re: (Score:2)
Yes. Because you don't get to real understanding until you can start using them.
The problem, of course, is people developing databases that you have to later work with before they've gotten enough understanding, but that's going to keep happening in any case. In fact, there will be more of it if you narrow the field of people with even a basic understanding of the field. (If its not bad databases, per se, that get built this way, it'l
Re: (Score:2)
Re: (Score:2)
Well, on a number of projects, I've often wished that they'd restricted the DB part to people who had 100 years of experience with it. That would have solved the DB problems we had quite handily.
I do however expect people to have at least a basic understanding what computing is and why ACID is very important.
Most of us who survived the 60s understand this. Timothy Leary taught us well.
Re: (Score:2)
Yes, theory is extremely important. If you don't have good theory both in the DML and DDL side, you are going to run into problems. But these are not extremely difficu
empowering (Score:2, Insightful)
Head First Books... (Score:2)
...are generally aimed at those new to { insert book's technology topic } and not seasoned programmers / developers / architects.
Many of the comments so far are negative, doubting how someone can become a data architect / DBA from the book... which is not the target audience... IMHO
As one who has seen quite a few programmers use unstructured text files, excel spreadsheets and access (as if it were a spreadsheet) for data storage, I welcome a resource that offers a painless introduction to the "magic" of
Please include reviewer's background (Score:3, Interesting)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Most of the time, a lot of us end up having to clean up databases designed by programmers. A lot of the time, the programmers don't really grasp the problems inherent in ignoring the O-R Impedance Mismatch issues and so we have a lot of horrid databases out th
Re: (Score:2)
Re: (Score:2)
If I'm going to shell out money for a book to learn something, why would I object to knowing that I'm learning?
And, if I'm going to shell out money for a book to learn something, why would I not prefer something that is either in depth, useful for reference, or both, especially given that the Head F
Re: (Score:2)
I don't have coding experience, but I DO have education experience. There is most definitely a place for books like this, as long as the reader is aware that it is not a end-all source of information about a subject.
Re: (Score:2)
I guess my feeling is that it would be great if beginner books at least discussed theory, at least in appendix. I.e. "Here is the basis of how this works, and here is where you can go to get more information" or "Here are a few known challenges you may run int
Re: (Score:2)
IME, there are beginner's books that discuss theory, etc., but they are, surprisingly enough, beginner's books on theory rather (e.g., Relational Database Design Clearly Explained) rather than beginner's books on SQL, or particular software stacks (like the various MySQL/Apache/PHP or similar intro books.)
Re: (Score:2)
However, this is not always the case. If you look at a lot of OLAP setups on BizgressMPP or Terradata, there isn;t a lot of denormalization necessary because you can address the issues via parallelism rather than summary storage. This is important b