Category Archives: Databases

Modality? What’s Modality?

Here’s a comment I received from Paul the other day about my database normalization tutorial: Very nice. Excellent. The only thing I would question would be that a customer could have zero orders. In order to exist as a customer … Continue reading

Posted in Databases | 3 Comments

The whole truth behind candidate keys

A reader of my tutorial on the 3 Normal Forms recently asked: The question is: why was customer_id not used as part of the composite primary key (order_id, customer_id , item_id) in 1NF in the first place? It’s a good … Continue reading

Posted in Databases | 2 Comments

3 Normal Forms Tutorial update

Many people have, over the years, both in the blog comments and in private messages, objected to my contention in the Normal Forms tutorial that ITEM_PRICE leads to failure of Second Normal Form. I always go back and forth about … Continue reading

Posted in Databases | Leave a comment

3 Normal Forms: Spanish Translation

I am happy to announce that my Three Normal Forms tutorial has been translated into Spanish by Roberto Fernandez. You can download it here.

Posted in Databases | Leave a comment

Debugging ORA-01001: invalid cursor

End-to-end performance tuning is something you hear more and more about. I have seen many presentations about how the “modern” DBA has to be intimately concerned with all layers of the application stack and cannot just focus on the database. … Continue reading

Posted in Databases | Leave a comment

Backup failure… One RMAN’s odyssey

Here’s a cautionary tale about not doing your homework first. There’s this Oracle 10.2 database on a Windows 2003 server that I manage. I noticed a big hard drive attached to it that was just sitting there unused, so I … Continue reading

Posted in Databases | 2 Comments

What happened to my automatic instance recovery?

Yesterday I had to shutdown a production reporting database (Oracle version 10.2.0.4) so they could add RAM to the server. The shutdown immediate wasn’t going fast enough to suit me, so I logged into a second session and issued a … Continue reading

Posted in Databases | Leave a comment

v$osstat anomaly

The v$osstat view shows certain OS-level metics such as number of CPUs, current system load, accumulated IO time, etc. Starting in 10gR2, it also records PHYSICAL_MEMORY_BYTES, which is the total size of physical memory on the server. See the documentation. … Continue reading

Posted in Databases | Leave a comment

cursor: pin S wait on X

I had a little excitement with the cursor: pin S wait on X wait event when a client’s website came grinding to a halt. The first thing I checked was blocking sessions… col username form a12 col event form a25 … Continue reading

Posted in Databases | Leave a comment

Testing disk I/O with the O_DIRECT flag

Sometimes I find the need to test disk IO rates, especially in the context of one of those delightful intra-office debates where the DBAs are blaming the lousy hardware for bad database performance and the sysadmins are blaming the lousy … Continue reading

Posted in Databases | Leave a comment