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


Learn Quantum Computing with Python and Q#

Author: Dr. Sarah Kaiser and Dr. Chris Granade
Publisher: Manning
Date: June 2021
Pages: 384
ISBN: 978-1617296130
Print: 1617296139
Kindle: B098BNK1T9
Audience: Developers interested in quantum computing
Rating: 4.5
Reviewer: Mike James
Quantum - it's the future...



ChatGPT For Dummies

Author: Pam Baker
Publisher: For Dummies
Pages: 176
ISBN: 9781394204632
Print: 1394204639
Kindle: B0C63LZ6DN
Audience: Everyone
Rating: 4
Reviewer: Ian Stirk

 


This book aims to introduce you to ChatGPT, how does it fare?


More Reviews

<ASIN:1449316409>

Last Updated ( Tuesday, 06 November 2012 )