The Art of SQL 225
Graeme Williams writes "One difference between SQL and a conventional procedural programming language is that for SQL there's a bigger gap between what the code says and what the code does. The Art of SQL is the opposite of a cookbook – or rather it's about cooking rather than recipes. It's not a reference manual, although there's plenty to refer back to. It's an intermediate level book which assumes you know how to read and write SQL, and analyzes what SQL does and how it does it." Read on for Graeme's review.
The Art of SQL | |
author | Stéphane Faroult with Peter Robson |
pages | xvi + 349 |
publisher | O'Reilly Media |
rating | 9 |
reviewer | Graeme Williams |
ISBN | 0-596-00894-5 |
summary | An excellent way to improve your approach to SQL |
I guess it's normal for an intermediate text to present a number of serious examples, the idea being that the code from an example can be applied to roughly similar problems with roughly similar solutions. I think Faroult's goal is both more abstract and more ambitious. He wants to expand your ability to navigate among and analyze alternative SQL statements with more confidence and over a larger range. This isn't so much a book about SQL as it is about thinking about SQL.
There's almost no chance that the SQL examples in the book will be directly applied to a real problem. The examples are relevant at one remove: What does thinking about this example tell me about thinking about my current problem? So the book doesn't come with downloadable samples. There's no point.
The first few chapters of the book lay a foundation for the rest. As each brick in this foundation is placed, it sometimes feels as though it's placed firmly on your head. Think about indexes ... whack! Think about join conditions ... whack! These chapters have very few examples – the goal is to force you to think through queries from first principles. It's more effective (and less painful) than it sounds.
These introductory chapters cover how a query is constructed and executed, including how a query optimizer uses the information which is available to it. Faroult discusses the costs and benefits of indexes, and the interaction of physical layout with indexes, grouping, row ordering and partitioning. He also explains the difference between a purely relational query and one with non-relational parts, and how such a query can be analyzed in layers. Chapter 4 is available on the book's web page. It will give you a good idea of the style of the book, but not of the level of SQL discussed – the longest example in the chapter is just 15 lines.
Chapter 6 presents and analyzes nine SQL patterns, from small result sets taken from a few tables, to large result sets taken from many tables. The chapter falls roughly in the middle of the book, and feels like its heart. Prior chapters have built up to this one, and subsequent chapters are elaborations on particular topics. The theme of the book, to the extent that it has one, is that details matter. Different SQL statements can be used to produce the same result, but their performance will be different depending on details of the data and database. A change to the database structure, such as adding an index, might improve performance in one set of circumstances, but make it worse in another. The case analysis in this chapter will make you more sensitive to details in query design and execution.
The authors almost never mention particular database products. Their justification is that any absolute statement would be invalidated by the next release, or even a different hardware configuration, and anyway, that's not the business they're in. But sometimes this can go too far. The phrase "A clever optimizer ... will be able to" is too hypothetical by half. Is this an existing hypothetical query optimizer, or a vision of a future optimizer? Or the optimizer of one hypothetical database product and not of another? I suspect that Faroult knows and is simply being coy. It's just unhelpful not to tell us what existing databases will do, even if depends on the release or the hardware.
Faroult does this because he's not much interested in telling you what actually happens when a particular SQL statement is executed by a particular database. If the authors wanted a cute title for the book, I'm surprised they passed over The Zen of SQL Maintenance. When you look at an SQL statement, Faroult wants you to see what other SQL statements would do under other circumstances. He literally wants you to see the possibilities.
The second half of the book continues the analysis of chapter 6 into special cases, such as OLAP and large volumes of data, monitoring and resolving performance issues, and debugging problematic SQL.
Chapter 7 discusses tree-structured data, like an employee table with a column for the employee's manager. Faroult likes his own solution best, but presents an alternative approach by Joe Celko clearly enough for you to explore that as well.
Chapter 8 includes a series of examples of SQL and PHP. For anyone like me who spends more time in various programming languages than in SQL, this chapter is a small gem. It nicely illuminates the care needed in deciding what happens in code and what happens in SQL.
Chapter 9 addresses locking and concurrency, as it applies to both physical and logical parallelism. Transactions are included, but the discussion is just one part of a 20-page chapter and seems thin.
The Art of SQL is very clearly written. Whether it is "easy" will depend on how comfortable you are with SQL. This book is targeted at (page xi) "developers with significant (one year or, preferably, more) experience of development with an SQL database", their managers and software architects. I have months of experience spread over a decade or more, so I'm nominally outside the target audience. I found the SQL examples and discussion clear once I had a chance to let them sink in. If you're working with SQL regularly, they'll be perfectly clear.
The graphs let down the otherwise high quality of the book. For example, Figure 5-3 shows a rate (higher is better) but the legend says "Relative cost" (higher is worse). Figures 9-1 through 9-3 on facing pages 228 and 229 show response time histograms for three different query rates but don't show what the rates are. The x-axis of Figure 10-1 seems to be calendar time, but it's decorated with a stop watch icon. And as a representative of rapidly aging boomers with rapidly deteriorating eyesight, could I beg book designers not to put figure legends in a smaller font than the text of the book? Diagrams should be simple and clear, not something to puzzle over.
This is a book to conjure with, but it's not a book for everyone. Some people may find it too abstract, with too much discussion of too few examples. If you're completely new to SQL, the book will be hard going. If you have very many years of experience with SQL, it's just possible that you won't find anything new in the book, although I expect you'll find a lot to think about. For anyone in between, The Art of SQL is a excellent way to improve the way you attack problems in database and query design.
You can purchase The Art of SQL from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
BN vs Amazon (Score:3, Informative)
Re: (Score:2, Informative)
Re:BN vs Amazon (Score:2)
I did the same search at B&N.com and got the page for this book. Can't buy what I can't find.
Re:BN vs Amazon (Score:3, Insightful)
bookpool (Score:5, Informative)
Re:bookpool (Score:2)
Re:bookpool (Score:2)
Cheaper isn't everything (Score:5, Insightful)
Stacey's Books [staceys.com] in San Francisco doesn't give me Amazon's 34 percent discount -- in fact, it gives me 10 percent -- but it is a wonderful resource and not one I'd like to see disappear.
That's not hyperbole either. This year we've seen two classic, quality Bay Area bookstores close their doors: Cody's on Telegraph Avenue in Berkeley and A Clean, Well-Lighted Place for Books on Van Ness in San Francisco. These were not holes in the wall; they were spacious, carried a lot of stock and had served their communities well for years. (And believe me, the Bay Area in general buys a lot of books.)
The reality is that the book market is changing. Superstores like Borders and Barnes and Noble have a lot to do with it, and so does Amazon. Another factor is the overall decline in book sales to the American public. People walk into Borders to buy DVDs of Friends and they pick up a paperback of Harry Potter at the same time. That's not the model I want my booksellers to be based around; I want to support local businesses that understand their communities and are dedicated to selling books.
This is not to knock Amazon, or Borders or B&N for that matter; in communities where those are the only option, it's better to have someplace to buy books than no place at all. I still buy plenty of stuff at Amazon. But for books, I vote with my wallet.
Re:Cheaper isn't everything (Score:3, Insightful)
In fact, if you have access to a local, independently-owned bookseller in your area, you should be buying your books there instead of online.
Only if you also stop by and mention to the manager that you're only buying your books there so that they don't go out of business, and that most people who buy books won't do the same, and that you might not in the future.
Businesses that require this sort of support in order to stay in business have a big problem: they're not viable businesses. What needs to ha
Re:Cheaper isn't everything (Score:3, Insightful)
Bullshit. The only reason Amazon is able to offer 34 percent discount on new books is because their business model presupposes nationwide sales.
Irrelevant. If the store can only stay in business if customers decide to make a sacrifice, buying from the store even though that's not their best choice (considering overall value), the store will not stay in business and you're just wasting your money.
On a slightly different topic, it's a little scary to me how many people on Slashdot advocate low price as
Re:Cheaper isn't everything (Score:2)
Obviously the reason I want to support them is because of their service and selection, not to mention the fact that they have a physical presence that caters to my community, which chain superstores can't do. Please, you're not that stupid.
Re:Cheaper isn't everything (Score:2)
For this particular book, why do you need to purchase from them? You know what the book is, so no service needed, and selection is also not aplicable.
So how is buying this book from them (which is what you recomended) any different then charity?
Re:Cheaper isn't everything (Score:2)
So how is buying this book from them (which is what you recomended) any different then charity?
It's different because of the motivation. If you value the existance of a local marketplace because it offers you value, you support it with your patronage so it will continue to exist. Pretty simple equation.
Re:Cheaper isn't everything (Score:2)
Just curious, but what service does it provide for you that a local library doesn't?
Of course, I live in Oregon which has the most loved horrible book store on the planet, Powells.
Lot's of used book at near or same as new books. Now with Snarky help!Gah.
Re:Cheaper isn't everything (Score:3, Insightful)
Not a lot of O'Reilly books in most libraries. Computer books in general are often poor choices for libraries, because the technology changes so frequently. If you donate your computer books to a local library they will most likely sell them off for a couple bucks apiece at a book sale.
If we're specifically talking about the bookstore I
Re:Cheaper isn't everything (Score:2)
Re:BN vs Amazon (Score:2)
art (Score:4, Insightful)
See this page [wikipedia.org] for a start on the science of databases.
*Yes, I know creativity is usually involved when designing things. That doesn't make it art.
Re:art (Score:3, Funny)
Imaginary?
Re:art (Score:2, Insightful)
Science, yes even computer science, and mathematics are particularly susceptible to elegance, and science (and engineering) built on elegant designs, based on concrete principles, have fewer points of failure, and can often be conceptually simpler, and algorithmically faster. Art is simply the application of insight, and this book (seems) to show us how insight into the problem space and the mathematics can achieve elegant (and eff
Art is about creativity, not rote coding (Score:5, Insightful)
Sure, the mechanics of programming is rather dull and boring, but large scale system design often requires considerable creativity that is much better done by people not constrained by artificially perceived IT limitations.
Coding J2EE isn't an art, but designing/building a massive neural net or complex, distributed game/simulation is. MySpace, Google, eBay, etc weren't concieved by 'classic' engineers, but, rather, by creative people who understood how technology can enable new paradigms.
Re:Art is about creativity, not rote coding (Score:4, Funny)
Re:Art is about creativity, not rote coding (Score:2, Insightful)
Re:Art is about creativity, not rote coding (Score:2)
Re:art (Score:2)
Designing proper databases and the SQL to use them optimally falls under the domain of science/engineering.
The process of doing science isn't as clear cut as you're trying to make it out to be. You're thinking of science as the nice, clean end product that's been checked and written in textbooks. Getting those results can most certainly be an "art" (that is something learned by experience, and not easily definable). Working with something as complex as a database is similar in that the performance you ge
Re:art (Score:2)
But adding cavities to design of nitrogen chilled supercomputer so you can cool things there does.
Re:art (Score:2)
Some of the tunings are counter-intuitive.
Clearly any complex setup with multiple tradeoffs and ill-defined specs requires a bit of an artist to set up. Your wiki link was nice, but many businesses don't budget enough money to do it that rigorously.
Re:Aristotle (Score:2)
Great Statement (Score:3, Funny)
I couldn't agree more. Sometimes while working in SQL I really wish I had a time machine [wikipedia.org] and a rubber hose.
Bummer, trees (Score:4, Insightful)
Looks like no discussion of many-to-many relationships. This would make any book on databases and sql queries of limited value, not much more than a beginner book.
Trees are of limited value, they only exist in special circumstances. If you stick to tree structured data relations then you will almost always have to do wierd hacks that may threaten data integrity.
While many-to-many *seems* harder, as a data model M:M is often a much better practicle solution. As well as modeling the reality of the situation in a much more accurrate manner.
My $.02
Re:Bummer, trees (Score:2)
Yes, in fact, I'm struggling to remember the last time I saw a tree structure, as I post one of many replies to your comment, which in turn is one reply of many to the article.
Trees crop up in all kinds of different places, and the approaches most newbies tend to take are awful. That warrants their inclusion in a book like this. I agree that many-to-many relationships are important, but that's no reason to neglect tree structure
Re:Bummer, trees (Score:2)
I for one am very frustrated with constant drilling down through file structures, conversation threads, posting comments which associate across different parent posts conceptualy but I have to post twice if the point is relevent to 2 source posts.
A cloud view based on meta data and linking would be nice. Almost like, date I say it, relationship
Re:Bummer, trees (Score:2)
I believe that they aren't a natural artifact of a conversation, but nobody has come up with a decent interface for multi-parent comments. There have been attempts, but they all end up being too confusing for very little gain. Comment trees are the optimum balance between complexity and usability.
easy (Score:2)
Re:Bummer, trees (Score:3, Informative)
Re:Bummer, trees (Score:3, Informative)
Trees are graphs; M2M is a general graph structure (Score:2)
Nested sets are cool, and I've implemented them (in MySQL 4.1 no less), but at the end of the day, traversing a graph happens far more often and more usefully.
This seems to be where the CS majors separate from the rest of the crowd. Point out that they ought to know how to do this unless they faile
Re:Bummer, trees (Score:3, Insightful)
You ARE just being facetious right?
Tree structures are everywhere in computing... Like file systems... Like the DOM for every web page you have ever looked at is represented by a tree structure.
As regards the coverage of M:M... Another post pointed out that it IS covered in the book.
As regards the usage of M:M... That's just for high level conceptual modeling right? Surely you are not actually going to implement that way but will instead insert an intersect object AKA associative table, right? Data
Re:Bummer, trees (Score:3, Insightful)
I basically agree with your post, but you're overlooking a significant part of the audience for this book -- people who didn't design the data structures they're querying. You're absolutely correct that tree structured data is a terrible hack in most databases, but if you're writing reports, or writing code to update legacy data, or the data was converted from another system altogether (perhaps written in Cobol or Quick Basic or some horrible old language where hierarchical data was a way to wring out some
Re:Bummer, trees (Score:2)
One trick I have with newbie sql coders is to make them think about the statement
select * from tblA, tblB
and compare to
select * from tblA, tblB where tblA.key = tblB.key
Easier to see what's going on with the original SQL
Re:Bummer, trees (Score:2)
Both of those are clearer when written using standard join syntax:
SELECT * FROM tblA CROSS JOIN tblB
SELECT * FROM tblA JOIN tblB USING (key)
Or if the column names are different:
SELECT * FROM tblA JOIN tblB ON (tblA.key = tblB.key)
One year of SQL is significant experience? (Score:3, Insightful)
Perhaps that's what's wrong with database development these days (just check out The Daily WTF [thedailywtf.com], as it seems they have a SQL example every other day). When a single year of experience is considered "significant" and "experienced", it's no wonder there are so many crap DBAs out there. We look for people with 5+ years of C# experience (ha! Good luck finding someone with more than 5 years experience ...) for intermediate-level developer positions. There's no way someone with only a year of SQL experience would qualify for an intermediate-level DBA position.
Just as background, I've been doing development on SQL Server for 6 years now (from SQL 7 to SQL 2005). I'm still learning, still finding ways to improve my code's cleanliness and performance, still finding new things I can do in SQL. For example, SQL 2005 finally has CTEs, making it only the second database to implement that ANSI SQL99 standard. CTEs make it very easy to do things that were painfully hard before, like walking a tree or implementing a recursive algorithm over sets of data.
After my fourth year of working with SQL, I'd have been willing to say I had "significant" experience with SQL. Four years is arbitrary -- it really depends on how much you work with it day to day. Someone may have "significant" experience after only two years, while someone else may not be significantly experienced until he's worked with SQL for eight years. If you had to put a number of years on what would constitute significant experience, I'd err on the safe side and go with three or four years. Certainly not just one year.
Re:One year of SQL is significant experience? (Score:2)
This goes for trades as well as engineering. The EIT paradigm used in engineering requires logging hours under a licensed engineer for what amounts to a 3 r more year apprenticeship.
Most trades programs do not allow you to be called 'Master' until after apprenticeship and being a journeyman for a few years.
The upshot being that most plumbers are probably better trained than IT people.
And the posts on this board prove it. Also, as bad as the review was, it gave me enou
Re:One year of SQL is significant experience? (Score:2)
Some people talk to me about databases like I'm Yoda. But I label myself as "very experienced." When performing the right kind of work I'd say it takes at least 4 or 5 years to gain significant experience.
CTEs (Score:2)
Re:CTEs (Score:2, Informative)
No, I'm talking about Common [sqlservercentral.com] Table [ibm.com] Expressions [ianywhere.com] (okay, so I was slightly wrong about implementation of CTEs -- apparently other products have implemented the standard, but DB2 and SQL Server 2005 are the only "Big Boy" engines with them). CTEs aren't so much about implementing a hierarchy as they are about doing recursiv
Re:CTEs (Score:3, Informative)
FWIW, the parent-child solve in Oracle is set based. CONNECT BY I think is the syntax, but it's been almost 7 years since I was working BOM hierarchies that utilized it heavily.
Re:CTEs (Score:3, Informative)
Like this: (shamelessly ripped from http://www.yafla.com/papers/sqlhierarchies/sqlhier archies.htm [yafla.com])
WITH CTE_Example (EmployeeID, FullName, BossID, Depth)
AS
(
SELECT EmployeeID, FullName, BossID, 0 AS Depth
FROM Employees WHERE EmployeeID = @boss_id
Re:One year of SQL is significant experience? (Score:2)
I assume you mean MSSQL7-MSSQL2005. Which is a horrible database to learn on. I have used almost every version, and Oracle is a lot better. Of course Informix could out perform both of them, but I digress.
Developers and SQL (Score:5, Insightful)
I spend much of my time explaining why a 5 page SQL statement "that takes a long time" is NOT A DATABASE PROBLEM!
/rant
Re:Developers and SQL (Score:2)
Re:Developers and SQL (Score:3, Informative)
Why is it not a database problem?
Because it's a 5 page SQL query.
Sometimes, fastest still takes a long time.
Re:Developers and SQL (Score:3, Insightful)
Or maybe you could leave that to the DBMS which already understands these things.
Re:Developers and SQL (Score:3, Interesting)
Re:Developers and SQL (Score:2)
Then you can have build the simple query you want and any issues with performance/maintenance will be in in the DBA hands.
Unless you are playing with data-warehouse size data or are using a toy *cough*MySQL*cough* a view like this shouldn't be a problem.
Re:Developers and SQL (Score:2)
Re:Developers and SQL (Score:3, Insightful)
Re:Developers and SQL (Score:3, Informative)
A useful review - Thanks! (Score:2, Informative)
SQL says what to do (Score:5, Insightful)
That's stated incorrectly. With SQL, the code says what to do, but it does not say how to do it. That's the difference between "normal" procedural code and languages like SQL.
Re:SQL says what to do (Score:2)
Re:SQL says what to do (Score:2)
SQL Books (Score:3, Insightful)
SQL can do a lot more than most programmers ever try to do with it. There are a lot of clever tricks you can use exploiting its set based nature. The only place I've seen clever solutions beyond simple insert/delete/update statements is some of the trade magazines; the one for MS SQL Server sometimes has some very neat examples. These trade magazines have examples and ideas presented using the SQL language of a particular database, but it's almost always portable wihtout much work. I consider myself pretty good at SQL and even I find it's hard to learn more to get to the point where I can design clever SQL more frequently. Anyone else find that too?
Another thing I've noticed is on some open source projects (and perhaps some closed source ones), particularly web based ones, there is displayed at the bottom the number of database queries used to generate the page. They are often 10 or more, which almost always seems ridiculous. I think there just aren't all that many people out there who understands what SQL can do, how it's different than procedural languages and how to use it beyond a simplistic straight forward approach. Hopefully this book helps explain that - I'll probably browse a bit the next time I'm in a book store.
Opening line (Score:2)
What? My SQL code tends to do exactly what the code says it will, are you trying to say that it's a high level language or am I missing something here?
Sounds interesting, but ... (Score:2)
This is an excellent book (Score:3, Informative)
I highly recommend this book; the $40 you'll spend on it will be repaid the first time you delete a swath of Java looping code and replace it with an additional subquery. If I can do half as well on my next book [generating...javacc.com] I'll consider it a job well done.
sql vs. procedural (Score:2, Interesting)
I have found (and who can disagree (just trolling)) that at least half of the production databases that I have come across hare not normalized. Go figgure.
Anyway, this being the case, I have found that SQL is poor in handling a non-normalized table/database. (cant really call a non-normalized table as a database can we? (nuther troll))
For example. We keep a complete record for each person for each pay period. Even inactives.
I am asked to give a li
select distinct (Score:2)
Actually, they don't, in the sense that there is no one single built-in command to handle this case. Just like in SQL, you (or someone else) has to write the function that performs a 'select distinct' equivalent.
Unless you're using a targeted-product (one built specifically for your data needs), nothing you do will be handled natively in any language. You can build this functionality by using correct SQL or writing the appropriate functions in a procedural language.
And why don't you consider 'select distinc
Re:sql vs. procedural (Score:4, Interesting)
Secondly what you are asking for is generally straightforward in any real dialect of SQL. Select distinct works fine, as do various scenarios with subselects and group by / having clauses (having is the most overlooked of the standard SQL clauses and it's use generally signifies you are using code written by someone who knows what they are doing).
However if you have a good dbms to hand that implements user defined functions then usually the best way if to create a function that returns the uid of the record from the multiple recordset you require (i.e. last payroll record for employee x) and use that in the where clause.
OTOH if you are stuck with MySQL then the first step you have to take is upgrade to Postgres
procedural programming (Score:4, Insightful)
Well, certainly one difference between SQL and a conventional procedural programming language is that SQL isn't procedural, it's declarative. One describes the data a query such produce, rather than state a set of steps necessary to achieve a desired result.
jbgreer
Sun Tzu! (Score:2)
Re:Sun Tzu! (Score:2)
Well, it really isn't at all important should it be a surprise.
And The Art of War faddish? The book is over 2500 years old, influenced Emperor Napoleon, General Patton, BH Liddell Hart (who in turn influenced the creation of the WWII German military strategies), General McArthur, etc, and has sold well to non-military types for at least 20 years. I think the world could use a few more boo
Difference (Score:2)
Or more importantly SQL is not a procedural programming language at all. Please don't try to compare the two together at all, it just leads to misconceptions about what SQL is and how it works.
the sample chapter is promising (Score:3, Informative)
The food reference, I'll bite (Score:2, Interesting)
There's a bigger CRAP (Score:2, Insightful)
Regarding > "there's a bigger gap between what the code says and what the code does." I think that's a typo. It should read...
there's bigger CRAP between what the code says and what the code does.
There's a lot of code in the RDBMS and normally you shouldn't have to delve into the RDBMS' source... But you should know what it does and how to use it.
I was once on a project where a DUHveloper needed to perform an unnatural sort on a key column. He needed to display the query results where certain rows
Re:MOD UP if the new Slashdot HTML sucks (Score:2)
To keep this at least somewhat on topic, the table with the book information seems to have 0 margins/padding [imageshack.us], making it a little ugly/difficult to read.
Re:Useless to all but theoraticians (Score:5, Insightful)
There is a transact sql book that I use frequently on multiple database systems. A small amount doesn't carry over, due to syntax differences. But the ideas on how to deal with sets of information in sql carry over. It appears that this book does that intentionally. And it should be useful in a very practical way if it is at all like the description.
Re:Useless to all but theoraticians (Score:5, Insightful)
When working in the extremes the strengths and weaknesses of each system have to be considered.
Re:Useless to all but theoraticians (Score:2)
i just started a new job this
Re:Useless to all but theoraticians (Score:2)
Re:Useless to all but theoraticians (Score:2)
There's
Re:Useless to all but theoraticians (Score:2)
I know that Transact SQL book you're talking about, and thought of it when I read this review. That's the best book on SQL I've ever read (by far) and I learned more about Oracle SQL from reading it than I have from reading at least a dozen more specifically Oracle-centric books. Fantastic book, I think it's called Advanced Transact SQL or some such. There's some proprietary stuff in there that's specific to MS SQL, but mostly it's a great overview of various ways to get a specific result set, and various w
Spoken like a hacker, rather than a pro (Score:5, Insightful)
And yet, if you get out and talk to some of the real-world database consultants who get called in to clean up other people's messes, one of the complaints you hear again and again is that too many so-called DBAs learned their trade on a specific product, rather than understanding why databases work the way they do.
Optimizations that you introduce into your applications to cater to specific products' features (or work around their shortcomings) may be a fact of life, but they make for poor design choices. You should know what you're doing first -- which means a good understanding of database theory -- and layer all that syntactic hot-rod stuff on later.
Re:Spoken like a hacker, rather than a pro (Score:2)
Re:Useless to all but theoraticians (Score:5, Insightful)
Software engineers and Database Administrators.
An intuitive "hackers" understanding of physics is perfectly sufficient to construct a gocart out of 2x4s and baby coach wheels, but automotive engineers find that a knowledge of "theory" is rather useful in getting practical work done.
In fact if your software does not have a solid grounding in theory it may well be worse than useless, as software is nothing more than applied science. The computer is a mathematics engine. Nothing less, nothing more.
If you do not understand the underlying structure of your high level language and the low level mathmatical theory below that you liable to make grevious mistakes in first selecting your high level tools, then in the specific models that you impliment with your code and then in your code itself.
And be utterly clueless that you have done so.
KFG
Re:Useless to all but theoraticians (Score:2)
You don't need a whole book for this - you need a magazine article. A whole book on theory is much less useful than maybe a book with a chapter on theory and a whole lot of chapters on practical appications specific to a given engine.
The problem is that the dif
Theory not a dirty word (Score:5, Insightful)
Not every programmer needs to be a computer scientist, but they do need to learn a little theory now and then. That's especially true when you're work with relational databases, which are full of weird abstractions and subtle performance issues. Not having looked at this particular book, I can't say whether its overkill for what most SQL people do. I can say that most database hackers don't seem to know as much theory as they should.
Re:Useless to all but theoraticians (Score:2)
I guess you skipped all the threads about computer science vs. programming and uni degrees vs a tech certificate.
Specifically regarding 'the best way to do x,' that may depend to a certain extent on the specifics of the platform at hand, but why do x? What do you hope to achieve? What are the desired results? Why not do y? If your thinking ha
WTF is a "theoraticians" (Score:3, Interesting)
So they seasoned pro with 15-years relational database experience who hasn't worked with new SQL-X is just as good as someone with no db experience on any platform? And when SQL-X 2.0 comes out, all those so-called experts, with their knowledge of SQL-X 1.9 are going to be useless, right? After all, "nothing is really transferable."
EVERYTHING is transferable. That is, everything you've actually
Re:Useless to all but theoraticians (Score:2)
You confuse syntax vs. execution. Your statement is equivalent to saying that since C++ and PHP have different syntaxes, there is no point in studying algorithms or design patterns. Would you agree with this statement as well?
All relational databases rely on predicate calculus at the end of the day. Understanding how relations work is fundamental to understanding what happens when you write something like "select A.x, B.y from
Re:Useless to all but theoraticians (Score:3, Insightful)
Re:Useless to all but theoraticians (Score:2, Interesting)
Re:Useless to all but theoraticians (Score:2)
That's funny, because I was just thinking it's odd that this book has no theory in it at all. At least in the review I saw no mention of the definition of ACID, the compromises at different transaction isolation levels, Codd's 12 rules for relational databases, Codd's original notation for relational algebra and relational calculus (of which SQL is
Re:SELECT * FROM first_post; (Score:5, Funny)
| You |
+---------+
| Fail It |
+---------+
1 row in set (0.08 sec)
Re:SELECT * FROM first_post; (Score:2)
Re:Where's the news? (Score:4, Informative)
I like book reviews.
Homepage preferences [slashdot.org] are your friends.
Re:So According to the blurb... (Score:2, Informative)
Yep, i said it.
Re:So According to the blurb... (Score:2)
Re:SQL fun (Score:4, Interesting)