Hello, you are not logged in.  Login or sign up
Community >> Blogs
Search Toad World Search

Blogs
Toad and Database Commentaries

 Toad World blogs are a mix of insightful how-tos from Quest experts as well as their commentary on experiences with new database technologies.

Do you have a topic that you'd like discussed?  We'd love to hear from you.  Send us your idea for a blog topic.

How is Oracle Like Scuba Diving?
 
Location: Blogs Mike Ault's Blog    
 MikeA Wednesday, February 21, 2007 4:08 PM

One of my favorite things to do (when I am not tuning and managing Oracle databases) is to don a scuba tank, mask, and exposure suit and slip beneath the waters surface. For a long time I wondered how to reconcile these two interests and then it came to me.

In industry the one thing that keeps businesses moving, provides them fuel and keeps them from getting choked is data. In scuba, what keeps you moving, provides you fuel and keeps you from choking is air. So using simile data is to business is like air is to a diver. 

What this simile leads to is that the equipment I use in scuba diving relates to the equipment used to support an Oracle database. Let’s see where this leads us. In scuba diving the basic equipment consists of a single air tank, a first stage regulator, a second stage regulator and a set of basic gauges. So how does this relate to an Oracle database and its support equipment?

The tank, usually aluminum or steel, is a reservoir for air, the tank is of various sizes, 50 cubic foot, 80 cubic foot, all the way up to 120 cubic foot. The tanks also come in different pressure capabilities, from 2500 psi up to 5000 psi. This would equate to the disk arrays, their various sizes and disk speeds.

The first stage regulator takes the high pressure air from tank and reduces it to around 135 to 145 PSI for use by the second stage regulator. The second stage regulator delivers the air at slightly above the current external pressure to the diver as he inhales, it is an on-demand type system. Of course, the regulators and hoses that deliver the air to the diver equate to the disk controllers, array controllers and device drivers that deliver the data to the user, they would also correspond to the database and application system that take your high pressure data and convert it into information that is usable.


Diver with a Single Tank, Regulator and Gauges

The basic gauges are a submersible pressure gauge (SPG), used to give you the pressure of the air remaining in your tank, a depth gauge and maybe a compass. In an Oracle database this would correspond to the basic tools available to a DBA for monitoring the system, for example Grid and Database control from Oracle and query tools that tell you how many records a query will return or business intelligence tools that tell you where your business is going correspond to the basic scuba gauges. Some advanced level divers use only the basic gauges and their advanced knowledge of decompression algorithms to plan and execute their dives.


Grid Control Screen Shot

It is funny that these advanced divers insist that using the dive computers is bad and that theirs is the only right way to dive, they even call their method of manual calculations and use of simple gauges and bottom times DIR, an acronym the stands for Doing It Right. These advanced divers remind me of some Oracle experts that insist the only way to do Oracle monitoring is through laborious scripts and arcane methodologies rather than making use of the proper tools at the proper time.

When you are diving you need to monitor three things, your depth, the amount of air you have left and the time you spend at a specific depth. All of this is used to be sure you don’t exceed what is known as a no-decompression limit (NDL) in recreational diving. If you exceed an NDL you have to go into a decompression dive where you have to hang out at specific depths for specific times to allow nitrogen to out gas from your blood so you don’t develop decompression illness. In Oracle you need to make sure your queries perform properly so they don’t exceed service level agreements (SLAs). In order to prevent a query from exceeding an SLA it must be monitored to make sure it doesn’t last to long, deal with too much data, or use improper access paths when getting data. If it exceeds SLAs then you have to perform long and tedious tuning operations upon it.

Now, if your database only has one set of disks (no RAID or just RAID 0) and if it only has a single node, single instance, single HBA, then it has too many single points of failure to be dependable. For the disks, a RAID array like RAID 10, allows for striping and mirroring so you have redundancy at the storage level. In Oracle the Real Application Cluster concept allows you to have multiple nodes connected by an interconnect and multiple instances allowing for redundancy at the processing (delivery system) level. This prevents a single point of failure from taking your database and hence your businesses life giving data, offline.

 Non-Redundant Oracle Set-up

With RAC, when a single failure occurs on one node, the users are relocated to a still functional node, the disks are isolated away from the failed node and the failed node may even be rebooted, thus isolating the failed instance and preventing split-brain or amnesia from damaging the data in the database.

  Diagram of Redundant RAC System 

In scuba diving no doubt you remember all of the great old movies and shows where the diver had on double tanks and some odd looking hoses that wrapped around his neck from both sides? Well, in modern scuba diving we still have double tanks and they are usually connected by a manifold with an isolation valve that acts as an interconnect between the tanks. Each tank has its own isolation valve and a primary regulator that has a separate secondary regulator, one side acts as a primary and the other a backup air source for the diver, thus providing redundancy. In the case of a failure of one primary, a blowout of a seal on one tank or failure of a hose or secondary regulator, the diver switches to the backup regulator, isolates the failed side of the manifold and turns off the tank valve on that side.


Doubles Rig in Scuba

Modern divers also use dive computers. A dive computer is, as its name implies, a small computer that is either worn on the wrist or in the console with the other gauges. The dive computer takes in the depth calculates the time at depth and uses algorithms that allow it to calculate how much nitrogen is absorbed into the various tissue compartments in the human body. Using this more accurate algorithm the dive computer provides for averaging of nitrogen absorption over the entire range of depths instead of using the old manual method that assumes all absorption occurs at the maximum, most restrictive depth. Most dive computers will also record the time, depth, temperature and nitrogen absorption over the entire dive period and allows the diver to upload this data into their own computer for later viewing and analysis. Some dive computers also have alarms for when NDLs are exceeded, ascent rates are exceeded and for other alarm conditions. Some allow the use of several different gas mixtures where Oxygen levels are adjusted to be optimal for a specific dive profile. Some will calculate decompression profiles if you exceed NDL.


Dive Computers

A dive computer allows for monitoring above and beyond the basic gauges and allows you to “tune” your dive for optimal bottom time and minimal chances of getting “bent”. With Oracle, the Grid and Database controls and third party tools such as Toad, Foglight and Spotlight for Oracle and RAC are the “dive computers” that allow you to optimize and tune the database performance and provide for trending activities from storage of performance data. These third party tools also allow for tuning of your system, advanced monitoring and planning.


  Screen shot of Spotlight for RAC

The final point of comparison between Oracle and scuba diving is that both are learning intensive and there is always something new to learn or do with both. In Oracle you have SQL programming, tuning, PL/SQL, XML, Java, ERDs, UMLs, HTML, Data warehouse technology, star schemas, OLAP, business intelligence and the list goes on and on. In scuba there are specialties such as wreck diving, decompression diving, saturation diving, ice diving, cave diving, underwater photography, videography, archeology, salvage and like Oracle the list goes on and on. Both are also gadget intensive where if you can imagine needing a widget or gadget some one is willing to sell it to you!

So, as you can see, there are many similarities between Oracle and scuba diving, once you dive beneath the surface and look for them!

Copyright ©2007 Quest Software Inc.
Permalink |  Trackback
Search Blog Entries
 
Blogger and Topic List
 

 

All Recent Entries
 

 

Johannes Ahrends
Unicode

Steven Feuerstein
Oracle PL/SQL

Daniel Norwood
Toad for Data Analysts
John Pocknell
Toad for Oracle
Bert Scalzo
Toad for Oracle, Data Modeling, Benchmarking
Jeff Smith
Toad product family
Richard To
SQL Optimization
Jim Wankowski
DB2 - LUW and z/OS
John Weathington
Compliance
Doug Williams
Database Musings
  Henrik "Mauritz" Johnson
Toad Tips & Tricks on the "other" Toads
  Toad World Editor
Toad World issues

  Toad Data Modeler Opens in a new window
Data Modeling
 

Copyright 2008 by Quest Software  | Terms Of Use | Privacy Statement | Contact Us