Click here to Skip to main content
15,887,936 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to create a table to store the fields "Name" (VarChar2 100 characters), "CPF" (VarChar2, 11 characters), and "Birth" (Date).
The "CPF" is required and unique (exclusive), has manual input that is fed by the user.

What I have tried:

I can create this table using the "CPF" field as the primary key, or can create another numeric field type (eg "id") with automatic entry using triggers to serve as the primary key.

My questions are as follows:

1 - Which of the two ways will perform better?
2. - Considering performance and consumption, which of the two forms would you recommend?

Thank you for your attention.
Posted
Updated 17-Oct-16 5:19am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900