Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PK and FK - NUMBER vs. RAW

garywickeOct 9 2014 — edited Oct 10 2014

Environment: Oracle 11.2.0.3 EE on Solaris


I currently support an application that was converted from an MS Access database.


The Access database used NUMBER data types for all the Primary Keys and Foreign keys.


The keys in the Access database were generated from a SEQUENCE-type function in Access (no functional meaning).


The new application is written in Java and the designers/developers decided to use a RAW(16) data type for the Primary and Foreign keys.


I'm not sure how the RAW keys are generated.


Why would they switch from a NUMBER data type to a RAW(16) data type?


Is the performance better when doing DML?


Is it somehow more secure?  If so, how?  I couldn't find any supportive material on that one.


The values I've seen in the RAW keys are 32 hex characters so it has to be taking up much more storage than the NUMBER keys.


Any insight into their decision would be greatly appreciated!


-gary

This post has been answered by Solomon Yakobson on Oct 9 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 7 2014
Added on Oct 9 2014
5 comments
1,979 views