Advanced Constraint Options

Constraint are objects we all know, we use them a lot when creating tables and they allow us to:

  1. Keep data integrity at the table level, like disallow null values using the “not null” constraint, enforcing unique values using “unique” constraint or allowing only values that meet conditions using the “check” constraint.
  2. Keep data integrity between tables using the “foreign key” constraint.
  3. Provide information to the optimizer for query optimization.

In addition to the constraint type and basic characteristics, there are some more advanced options we can configure and can help us in specific cases. In this post I’ll explain some of these advanced options. Continue reading “Advanced Constraint Options”

How are Numbers Saved in Oracle?

I’ve been asked quite a few times about the difference between number and character columns in Oracle. So I decided to write this article in order to explain how things work.

Many people, mainly those with programing background, assume that Oracle, like programming languages, contains character columns that work like STRING in programing languages, and number columns that work like INTEGER, DOUBLE and similar in programing languages. If this is the case, working with numbers in Oracle is much more efficient than text, the value has a static size of 4 or 8 bytes, the CPU works with number natively in math calculations, and therefore, number columns are better (when relevant).

However, this is not the case.

Continue reading “How are Numbers Saved in Oracle?”

Understanding Oracle Patching

Lately, I talked to several customers about Oracle patches, and each time it takes me quite a while to explain how it works.

So for all of you who don’t know about the different patching options (and what’s new in 12c), here is a short explanation about the topic.

Update (Feb 2016) – Oracle has recently changed the naming method for PSUs, please read my update here. Continue reading “Understanding Oracle Patching”