Mailbag: SQL Exercises
I recently bought your book, Beginning Oracle Database 11g Administration: From Novice to Professional. I took a promotion with my organization to be the DBA, but I have precious little experience in the field. Your line in the introduction, “If you are an IT professional who has been thrust into an Oracle Database administration role without the benefit of formal training … then I wrote this book for you” suits me exactly. Now I have been to one training session and there are more to come, but this book looks like exactly what I need to get a good start on my new career.
I have obviously started reading your book and I have a question for you. I understand the end of chapter exercises, but where do I go to verify that my SQL statements are more or less correct? I want to take full advantage of this book and I don’t want to get off on the wrong foot.
Thank you for your time,
C. M. [name withheld]
I apologize for the delay in my reply. I have a similar story. My first IT job was COBOL programming and C programming. Then a DBA position opened up and I convinced my manager to let me try my hand at it. Several years later, the Oracle DBA quit and another manager offered me the chance to learn Oracle. My hiring philosophy is that we should simply give the smartest people the chance and then buy them as many textbooks as they want!
The SQL exercise at the end of Chapter 2 is to rewrite the SQL statements in Listings 2–22 through 2–28 by using the NOT EXISTS clause instead of the MINUS operator and without using subquery factoring. You can download all the source code in my book from the publisher’s website. This will allow you to verify that your queries produce the same results as the listings in Chapter 2.
If you would like to continue studying SQL, I can recommend the recently revised Beginning Oracle SQL (Apress, December 2009) by Lex de Haan, Tim Gorman, Karen Morton, and Daniel Fink.
Best of luck in your new assignment,