News, views, tips and tricks on Oracle and other fun stuff

Database as a Storage (DBaaS) vs. Thick Database

A recent addition to my Oracle PL/SQL library is the book Oracle PL/SQL Performance Tuning Tips & Techniques by Michael Rosenblum and Dr. Paul Dorsey.

I agree with Steven Feuerstein’s review that “if you write PL/SQL or are responsible for tuning the PL/SQL code written by someone else, this book will give you a broader, deeper set of tools with which to achieve PL/SQL success”.

In the foreword of the book, Bryn Llewellyn writes:

The database module should be exposed by a PL/SQL API. And the details of the names and structures of the tables, and the SQL that manipulates them, should be securely hidden from the application server module. This paradigm is sometimes known as “thick database.” It sets the context for the discussion of when to use SQL and when to use PL/SQL. The only kind of SQL statement that the application server may issue is a PL/SQL anonymous block that invokes one of the API’s subprograms.

I subscribe to the thick database paradigm. The implementation details of how a transaction is processed and where the data is stored in the database should be hidden behind PL/SQL APIs. Java developers do not have to know how the data is manipulated or the tables where the data is persisted, they just have to call the API.

However, like Bryn, I have seen many projects where all calls to the database are implemented as SQL statements that directly manipulate the application’s database tables. The manipulation is usually done via an ORM framework such as Hibernate.

In the book, the authors share a particularly bad example of this design. A single request from a client machine generated 60,000 round-trips from the application server to the database. They explain the reason behind this large number:

Java developers who think of the database as nothing more than a place to store persistent copies of their classes use Getters and Setters to retrieve and/or update individual attributes of objects. This type of development can generate a round-trip for every attribute of every object in the database. This means that inserting a row into a table with 100 columns results in a single INSERT followed by 99 UPDATE statements. Retrieving this record from the database then requires 100 independent queries. In the application server.

Wow! That’s bad. Multiply this by a 100 concurrent requests and users will start complaining about a “slow database”. NoSQL to the rescue!

2 Comments | Filed in Oracle | Tags: , ,

About Oracle Press

Oracle Press is a marketing label used by McGraw Hill to market its line of Oracle books – the books are not formally written by Oracle Corporation nor are they formally tech edited by Oracle Corporation, although some employees of Oracle Corporation have used McGraw Hill as a publishing company. At least for me, for several years the “Officially Authorized Oracle Press” logo on books published by McGraw Hill seemed to be endorsement of the books by Oracle Corporation, but that is not the case.

via Charles Hooper’s Oracle Notes.

Comments Off on About Oracle Press | Filed in Oracle | Tags:

Hundreds of Free E-Books, Wow!

I came across this Chinese website that has hundreds of e-books about Oracle, Microsoft, Dreamweaver, Flash, Java, PHP, mySQL, Linux, Cisco and many many more, all ready for your online reading pleasure. I do not think this is legal. At least, it is as legal as software piracy.

2 Comments | Filed in ColdFusion, Oracle | Tags:

15 Reasons Why Books Have Problems

books.jpg According to Jeff Jarvis, the book is an outmoded means of communicating information. He lists many problems with books. According to him, books:

  1. Are frozen in time without the means of being updated and corrected.
  2. Have no link to related knowledge, debates, and sources.
  3. Create, at best, a one-way relationship with a reader.
  4. Try to teach readers but don’t teach authors.
  5. Tend to be too damned long because they have to be long enough to be books.
  6. Limit how knowledge can be found because they have to sit on a shelf under one address.
  7. Are expensive to produce.
  8. Depend on scarce shelf space.
  9. Depend on blockbuster economics.
  10. Can’t afford to serve the real mass of niches.
  11. Aren’t searchable.
  12. Aren’t linkable.
  13. Have no metadata.
  14. Carry no conversation.
  15. Thrown out when there’s no space for them anymore. Print is where words go to die.

Of course, his ideas about books resulted in many comments. I summarize:

  1. Electronics simply can’t replace the tactile experience of reading a book.
  2. Smart authors have found ways to blend the print with the electronic to offer something more.
  3. Books need no batteries, no operating systems, no proprietary viewing clients, they have no software glitches, no format incompatibilities, and you can take them to the beach to read them lying in the sun.
  4. Any book printed today is searchable in Google Books or Amazon’s Search Inside the Book.
  5. Great books are timeless.
  6. Imagine reading Tolstoy with ads for eBay down the side.
  7. Books are for cozying up to the fireplace.
  8. You can’t beat the new book smell and the opening of never opened pages that’s damn right awesome.
  9. Writers deserve to be able to make money from their creations without fear that it’s going to be be copied duplicated and spread around without them earning a penny.
  10. The only thing that will stop physical book printing is when all the trees of the world are dead, and at that point I don’t think anyone of us will really care about reading anymore.
  11. Books and written materials have survived for hundreds and thousands of years. They are still readable. Do you think the electronic media will be around and readable in 400 years? Not likely.
  12. It is a good thing they are frozen in time. My only problem with the Internet is that it can never be clear-cut, because of the mixture of opinions and biases that make it up.
  13. Books provide the writer’s opinion, and nothing else. You don’t read a book to get a multitude of opinions, you read a book because you respect the writer and want to hear his/her opinion.
  14. The author is the one who learns the most from writing their book, because of all the knowledge they have to accumulate in order to make the book worth reading.
  15. When you buy a book, most of the time you get a CD of the book in PDF format.

I believe that both electronic and print media can, and will, coexist together in harmony without one replacing the other. I admit that I buy books less often than what I used to in the past. Usually I buy books for authors I know and I like. I subscribe to Safari Books Online mostly because I am online at least eight hours a day.

Even professionals who can be very good book authors shy away from writing a book because “the figures just don’t add up” especially that “these days, when you can self-publish on the Web, or publish your book as a PDF and sell it online, writing a book is not such a compelling deal”. Even my favorite author reads books on his Palm Pilot :).

6 Comments | Filed in Technology | Tags:

New Oracle 10g Book Center

I have just noticed that OTN has now an Oracle 10g Book Center. The page lists Oracle books from Oracle Press, Apress, Elsevier Digital Press, O’Reilly & Associates, Prentice Hall Professional Technical Reference, Rampant, TechPress and Sams Publishing.

Each book has a direct link to and most of them have sample chapters for you to download. There is also a single page to download all sample book chapters.

Check out the Oracle 10g Book Center on OTN.

4 Comments | Filed in Oracle | Tags:

Oracle Books on

Ning has been up and running for a while now, but only recently I had a bit of time to play with it. In case you do not know, Ning is a free online service for building social applications that enable anyone to match, transact, and communicate with other people. Continue reading…

2 Comments | Filed in Oracle | Tags: , , ,

The Oracle Resources Book

Triggered by Francois’s comment, I have created a new collaborative book on oradot: The Oracle Resources Book. This is an online book that you can contribute to and I urge you to do so. The more Oracle community members add information to this book, the more useful it becomes. There are a lot of Oracle information out there in the cyberspace and the Oracle Resources Book should not re-invent the wheel in my opinion, rather than, at the least, point the Oracle professionals and newbies to the right direction.

2 Comments | Filed in Oracle | Tags: ,

Underscores make a difference

I was setting up my environment to test out the examples in the book “Expert Oracle Database Architecture“. I started to set up runstats, a tool that measures the elapsed time, system statistics and latching. To use runstats, I (scott/tiger) needed access to some v$ tables (a.k.a. magic dynamic performance tables). On page xxxii of the book, it says: Continue reading…

7 Comments | Filed in Oracle, Tips | Tags:

My most important Oracle book

Well, my wait is over and now I have the book. I’m not lucky enough to have it signed by Tom though, maybe volume 2? Continue reading…

9 Comments | Filed in Oracle, Personal | Tags:

Tom Kyte’s Newest Book and SQLPlus Prompt

I downloaded part of Tom Kyte’s newest book “Expert Oracle Database Architecture – 9i and 10g Programming Techniques and Solutions” from Tom’s blog and started reading with interest (Can’t wait until the book is available at Amazon). I got to page 25, “Setting Up Your Environment” and read through page 28 when I noticed the following: Continue reading…

3 Comments | Filed in Oracle | Tags: ,