I came to know that there are 4 ways to generate a primary key automatically in Hibernate. They are as shown below.
My question is for which database which strategy needs to be used? Also is the working of each of these different internal implementations or there is something which needs to be done different externally?
I would appreciate a detailed answer preferably with an example and explanation.