We have an Oracle database that has been around for 10 years. He went through many hands. During those years, it grew quite large, and there are some interesting anomalies in its design that puzzled me.
Now I am historically a SQL Server developer. I often steamed and smoked about the differences between Microsoft Way (tm) and The Oracle Way (R). Now, I understand, they are just different. I also used to pry my hair and bang my head on the table, thinking that the people in front of me were blind, deaf idlers picked up Jolt and Red Bull, who wrote code in Tourette's.NET.
(Yes, I'm going somewhere.)
Over time, I realized that no database platform was inherently better than another. They are just different. In addition, I also realized that the developers who came in front of me often had good reasons for designing and writing things the way they did. Just because I was not connected with him, it did not make it wrong. Of course, the documentation could have been better, but still.
So here, where all this brings me:
We have several tables in the database that have two separate owners. Both owners define the same primary key constraints in the table. It puzzled me. Why are there several owners in the table? And why does each owner define separate but identical primary keys?
These guys developed a pretty well laid out database with a lot of primary keys. But they did not use indexes very much. When they used indexes, they usually did one large index instead of many separate indexes. Are there any convincing performance benefits from this?
We also avoided foreign key restrictions such as the plague. I don’t know why we would do it. Is there a reason to avoid them in Oracle? I see many reasons to use them to ensure data integrity between tables, and we just don't use them. I suppose there is a good reason, and I'm just not involved in this.
Finally, are there any good reasons to avoid using triggers (besides the obvious trap of performance hits)? We don't seem to use that much either.
Oracle 9i.
, , . - Microsoft, Oracle Way - . , , , - .
Noodliness StackOverflow.
--
- , .
- , .
- ERWIN . ( , .) , ORM, .
- SQL , .
- , , SQL SQL , . , , . (: .)