For a table with a unique set of character data(eg. varchar2). Cardinality could be high or low.
What is the difference between
1. PK constraint on a text field, then using this column as FK for other tables.
and
2. Creating an incrementing number field that is the PK and putting a UNIQUE constraint on the text field. Use the number field as the FK in other tables?
From what I can see, choice 1 is better because I wouldn't have to join the parent table to get the varchar2 field.
Is an index on a number field that much faster than an index on a varchar2 field.
What is the difference between
1. PK constraint on a text field, then using this column as FK for other tables.
and
2. Creating an incrementing number field that is the PK and putting a UNIQUE constraint on the text field. Use the number field as the FK in other tables?
From what I can see, choice 1 is better because I wouldn't have to join the parent table to get the varchar2 field.
Is an index on a number field that much faster than an index on a varchar2 field.