Suppose I've created a table to keep track of hominids : CREATE TABLE hominids ( hominid_name VARCHAR2 (100), home_territory VARCHAR2 (100), brain_size_cm INTEGER ) / I might then write code like this: DECLARE l_b_hominid_name VARCHAR2 (100) := 'Bonobo'; l_b_brain_size_cm INTEGER := 500; l_g_hominid_name VARCHAR2 (100) := 'Gorilla'; l_g_brain_size_cm INTEGER := 750; l_n_hominid_name VARCHAR2 (100) := 'Neanderthal'; l_n_brain_size_cm INTEGER := 1800; What do you think? I find the little voice of Relational Theory inside my head rebelling. "All that repetition! All that denormalization ! All that typing (or copy-pasting, which is even worse)!" Surely if I should avoid having redundant data in rows of my tables, I should avoid redundant code, too? Yes, I should. I don't like to see long lists of declarations, especially when the names are very similar and follow a pattern. A f...
For the last twenty years, I have managed to transform an obsession with PL/SQL into a paying job. How cool is that?