-
Microsoft SQL Server 2008 - T-SQL Querying March 2009下载
资源介绍
I had met Itzik Ben-Gan briefl y a couple of times and knew of his reputation, so I was looking
forward to his afternoon session on avoiding cursors in SQL programming at PASS. I was lucky
to get there early, as the large room fi lled up quickly. Itzik took a couple of SQL programming
problems and diced them up in the most skillful and entertaining way, showing the elegance
and effi ciency of set-oriented thinking. The audience loved it—and so did I, except I had
a different angle. Having worked on the internals of SQL Server, I could see Itzik touch the
product nerves in his demos, and I admired how he turned features into beautiful solutions.
After the session, I asked one of the attendees what had been his main takeaway, curious
about which of the many techniques would have stood out for him. He looked at me, mildly
surprised, and just said, “The man is a genius!” That pretty much sums it up.
This question of cursors is more fundamental than it may appear at fi rst. It points to a deep
dichotomy of tremendous practical importance. Most of us were taught to program by chopping
up a task into smaller steps that, when executed in sequence, perform a desired computation. But
if you approach SQL programming this way, you will get only mediocre results. Your code will be
much larger and harder to maintain. It will be less effi cient, less fl exible, and less tunable. Using
SQL effectively is not about an incremental extension of your procedural programming skills
or about a specifi c collection of tricks. Writing SQL well requires approaching problems with a
different mind-set—one that is declarative and set oriented, not procedural. This is the dichotomy.
Inside Microsoft SQL Server 2008: T-SQL Querying puts together all the ingredients you need
to understand this declarative and set-oriented way of thinking and become a profi cient
SQL programmer, thus making an important contribution to the SQL Server development
community. Its chapters on formal foundations help you understand the basis for the language
philosophy and get a sense for its potential. The language itself is covered thoroughly, from
the basic operations to the most advanced features, all of them explained in the context of
real problem solving. The many examples show you what good SQL looks like, and they cover
common patterns you are likely to fi nd when writing applications. A comprehensive chapter on
query tuning explains in detail the factors that impact performance in the system, how to go
about identifying issues, and how to address them effectively.
Itzik assembled a strong team of collaborators to write this book. Coming from different
backgrounds, all of them share a deep expertise in SQL, a passion for database technology,
extensive teaching experience, and a recognized track record of contributions to the SQL
Server community. Steve Kass is known for his depth of understanding and clarity of thought.
Dejan Sarka contributes an extensive knowledge of the relational model and a breadth of
database technologies. As for Lubor Kollar, I’ve had the pleasure of working with him on the
defi nition, design, and implementation of the Query Processing engine of SQL Server for
over a decade, and I deeply respect his insight. They make an outstanding team of guides
who can help you improve your skills.