SQL and Relational Theory

Author: C Date
Publisher: O'Reilly, 2009
Pages: 426
ISBN: 978-0596523060
Aimed at: SQL developers
Rating: 4
Pros: Provides important insights into database theory
Cons: Not an easy read and not practically useful
Reviewed by: Mike James

This is a very strange book - especially so if you are expecting it to deal with how to write accurate SQL code as its title suggests. There is a sense in which it does discuss topics which might lead you to construct better SQL code but it is certainly not a cookbook, hints and tips or indeed about programming SQL.

[This review is of the 2009 first edition of this book. The second edition, ISBN:978-1449316402 from 2011, includes new material on recursive queries, “missing information” without nulls, new update operators, and topics such as aggregate operators, grouping and ungrouping, and view updating.]

 

Banner

 

What it is about is the theory that underpins the whole approach to database that is typified by SQL and other relational databases. If you have thought about SQL as "just another language" or relational databases as some sort of marketing idea you might be surprised to discover that the whole subject started out as an attempt to provide mathematical rigour to database theory. E.F. Codd, a mathematician working for IBM, noticed that a database consisted of tables that could be considered to be mathematical relations - hence relational database.

This book provides a good explanation of that theory and a lot of other mathematical ideas. However all of the ideas are fundamentally simple, if you have even a slight mathematical tendency, and could even be considered to be "snake oil". For example, a long discussion of using De Morgan's laws to transform logical conditions, something that isn't particularly noteworthy in other branches of programming, is perhaps over long and gives the topic too much importance. Yes, it is important and every programmer should understand it, but it's fairly trivial. You could say that this is also typical of the whole relational theory - it is important but is fundamentally trivial.

If you don't know about relational theory and the many normal forms that can be applied to a database then this is a really good book to get to grips with it all. It isn't an easy read unless you are a bit of a mathematician and some might just give up on it for that reason. But there are some far more mathematical accounts of the same ideas! Of course there are those who would point out that the theory of relational databases has done much to create inefficiency and a mismatch between what we want databases to do and how they are implemented. A mathematical theory might be beautiful and satisfying but that's not the same as it being even the slightest bit practical.

Should you read this book? If you are a SQL programmer the answer has to be yes - how else can you understand why you are doing things in the way that you are. I'm not at all certain that it will help you write more accurate SQL code, however.

 

Banner


Domain Storytelling (Pearson)

Author: Stefan Hofer
Publisher: Pearson
Pages: 288
ISBN:978-0137458912
Print:0137458916
Kindle:B099ZNXCJT
Audience: software architects
Rating: 4.5
Reviewer: Kay Ewbank

This book sets out to be a practical guide to database domains, bringing together domain experts, software developers, designers and bus [ ... ]



Artificial Intelligence and Expert Systems (Mercury Learning)

Authors: I. Gupta & G. Nagpa
Publisher: Mercury Learning
Pages: 412
ISBN: 978-1683925071
Print: 1683925076
Kindle: B087785GZM
Audience: Technically able readers
Rating: 4
Reviewer: Mike James
Expert Systems, anyone?


More Reviews

<ASIN:1449316409>

Last Updated ( Tuesday, 06 November 2012 )