views:

953

answers:

7

I'm looking for a book which combines relational database theory, design and SQL techniques in a generic sense if possible. I have a feeling this is a big ask, and if that's really not available then I don't mind having perhaps two separate specialist books (one for RDBMS theory and one for SQL techniques). Any recommendations?

+2  A: 

Relational Database Theory: A Comprehensive Introduction

Database in Depth: Relational Theory for Practitioners by O'Reilly Media

Designing Relational Database Systems

TheTXI
+4  A: 
braveterry
+1 for being the strangest thing I have seen today.
Oorang
LOL - can't believe such a book exists :)
VVS
Wow that is strange, might just have to buy it for that reason! Sneaky marketers...
Wayne Koorts
I read it recently on O'Reilly's Safari site, and it was surprisingly good. They covered a lot more material than I would have expected.
Jim Ferrans
Had to order this for our summer interns!
Dan Sydner
From what I've read on a mailing list that discusses database theory and 'The Third Manifesto' in particular, it is actually a surprisingly good book.
Jonathan Leffler
Unsurprisingly, Larry Gonick's influence is far reaching.
outis
+1  A: 
John Saunders
ooooh a picture!
JoeCool
Click it. It really goes places.
John Saunders
+3  A: 

I would recommend every single book written by Joe Celko, especially Joe Celko's SQL for Smarties: Advanced SQL Programming Third Edition

VVS
If looking for an intro to SQL design some of his other books are better than SQL for Smarties, but for "SQL Techniques" it's fantastic.
Tom H.
+2  A: 

I absolutely loved this online tutorial:

Database design with UML and SQL, 3rd edition

Calling it a online tutorial doesn't really do it justice. The nice thing about it is that it teaches you DB design with UML modeling integrated into the process at every step.

One complaint I have is that, if I remember from taking the tutorial, it implies that surrogate keys are generally bad. However, I've heard a lot of other people here on SO as well as the author of the DB book I am currently reading ("Pro SQL Server 2005 Database Design and Optimization") say that surrogate keys are almost always the way to go. Otherwise, you're very restricted in the changes you can make to the structure of your DB down the road.

JoeCool
Thanks for the link!
VVS
it's certainly strange how he advocates against using an ID field as primary key. lots of times i've had to deal with data bases without such, that turn into a mess when small working conditions change and previously unique keys aren't unique anymore. in a couple of cases the database was so entrenched that it shaped the whole corporate culture, and the artificial uniqueness requirements made incredibly hard for the whole business to evolve with the times
Javier
+2  A: 

An Introduction to Database Systems by C. J. Date for RDBMS theory.

Paul Morgan
+4  A: 

C.J. Date's, Introduction to Database Systems, is a great formal overview of database systems, both theory and practice. His book, Database in Depth: Relational Theory for Practitioners, was already mentioned as a good resource. He has recently published an updated version of that book retitled as SQL and Relational Theory: How to Write Accurate SQL Code. Either one is good. SQL and Relational Theory is a little less formal and more pragmatic in it's approach. As the title suggests, it's aimed primarily at helping you use relational theory to write better SQL, not simply to teach you the theory.

I also like Applied Mathematics for Database Professionals by Lex de Haan and Toon Koppelaars. It goes beyond relational algebra and covers symbolic logic and set theory, including a methodology for specifying a database using symbolic logic. It takes some work to get through, but you won't regret it.

Finally, I second the recommendation to read everything Joe Celko has ever written.

Tumba