In my database, all tables have a OID column to identifiate each row.
These OID are generated throught a UUID algorithm.
I 've heard that OID should be hidden to the client Application.
So, must I use :
+ Contract findByPrimaryKey (String OID);
xor + Contract findByPrimaryKey (Long contractID) where contractID is a beasness meaning key ?
Thanks for your comment.
-
Natural key or OID key for findByPrimaryKey ? (1 messages)
- Posted by: Jerome Angibaud
- Posted on: November 24 2002 12:20 EST
Threaded Messages (1)
- Natural key or OID key for findByPrimaryKey ? by Ajaykumar Menon on November 27 2002 10:51 EST
-
Natural key or OID key for findByPrimaryKey ?[ Go to top ]
- Posted by: Ajaykumar Menon
- Posted on: November 27 2002 10:51 EST
- in response to Jerome Angibaud
Hi,
To me it does not make too much of a difference. Yes the client should not be aware of the UUID by your developers should be. Use what you are storing in the referencing tables. That way you avoid round trips. If code is never to be changed then suggest using that, since size would be smaller (I hope). Preferably thing of using integers. Otherwise the application perf would always be wanting.
All the best.