I want to ask this question again from ORM perspective (Hibernate/JPA with Oracle behind).
We are changing our DB design and one very important change we can make right now is to use surrogate keys in place of natural keys.
My questions in this regard are:
1. I understand in general people believe that if a single column natural key is available then use that instead of surrogate key. But this means some of the keys will be numeric type while others will be
string (or date in some cases). From ORM perspective is it worthwhile to keep all keys of same type (say number)? Does it help increase code re-usability and less maintenance in future?
2. For relation tables, is there any benefit of adding a surrogate key to avoid composite key? Mostly we have 2 columns in relation tables (both FKs). It is rare that we will search a relation based on its PK.