Mar 23 2009

SQL and Relational Theory

Tag: Book ReviewChristian Antognini @ 9:24 pm

C. J. Date was the keynote speaker at this year’s Hotsos Symposium. The speech was entitled “Foundation Matters”. I couldn’t agree more. Fondations are very, very important. As I wrote at the beginning of part 1 (which, by the way, is entitled “Fondations”) of my book:

He who has not first laid his foundations may be able with great ability to lay them afterwards, but they will be laid with trouble to the architect and danger to the building.
Niccoló Machiavelli, Il principe. 1532.

I found Chris’ speech really interesting. As a result, I decided to read his newest book: SQL and Relational Theory: How to Write Accurate SQL Code. Even if I must admit that it was not always an easy read…, I would advise every developer who uses SQL on a regular (daily) basis to read it.

There are only two things that disappointed me:

  • Chris is known for being against NULLs in relational databases. Hence, I was expecting to have full coverage of this topic in such a book. Instead, there are only few pages in chapter 4 (No Duplicates, No Nulls) about it. And, sadly, the chapter ends with the following paragraph:

Of course, if nulls are prohibited, then missing information will have to be handled by some others means. Unfortunately, those other means are much too complex to be discussed in detail here. The SQL mechanism of (nonnull) default values can be used in simple cases; but for a more comprehensive examination of the issues involved, including in particular an explanation of how you can still get “don’t know” answers when you want them, even from a database without nulls, I’m afraid I’ll have to refer you to some of the publications listed in Appendix D.

  • I did not understand why there is so much Tutorial D in the book. I mean, since this is a book for database practitioners, it makes not much sense, in my opinion, to spend so much time explaining its syntax and its features.

All in all, a very interesting reading!


Mar 08 2009

Troubleshooting Oracle Performance – Downloadable Files

Tag: TOPChristian Antognini @ 9:06 am

I just uploaded a new version of the scripts related to my book, Troubleshooting Oracle Performance. If you are among one of the about 1500 persons that downloaded the initial release, I suggest you to download the new one through this page.

The change log is the following:

connect.sql Added DBM11107 and DBA11107
chapter02/bind_variables.sql Fixed typo in comment
chapter02/sharable_cursors.sql Added note about sharable_cursors_9i.sql + Fixed comment
chapter02/sharable_cursors_9i.sql New file
chapter03/map_session_to_tracefile.sql As of 11g the function LOWER must not be applied to the instance name
chapter04/col_usage.sql New file
chapter04/comparing_object_statistics.sql Fixed timing issue after sleep + ORA-00001
chapter05/bug5015557.sql Fixed hints + Added note about supported database releases
chapter05/dynamic_sampling_levels.sql Fixed typo in header
chapter05/optimizer_secure_view_merging.sql Added service to CONNECT statements + Changed notes in header
chapter06/explain_plan.sql Fixed wrong CTAS in “Setup test environment”
chapter07/baseline_autoevolution.sql New file
chapter07/all_rows.sql Added query to show SQL profile in 11g
chapter08/ParsingTest1.cs New file
chapter08/ParsingTest2.cs New file
chapter09/hash_cluster.sql New file
chapter10/merge_join.sql Added hint gather_plan_statistics to the last three queries
chapter11/ArrayInterface.cs New file
chapter11/RowPrefetching.cs New file
databases/DBA11107 New directory containing the files to create the database DBA11107
databases/DBM11107 New directory containing the files to create the database DBM11107