Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Who should create the PK, view or table?
Message
From
14/09/2004 15:13:48
 
 
To
13/09/2004 17:43:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00941514
Message ID:
00942056
Views:
17
>In this scenario you have to create the PK in the view. I use views mostly for children tables, so I did not thought about this.
I store the PK in a separate table, so I don't need GUIDs. If I create twice the PK (in the table and in the view), I thought I was wasting PKs; to my surprise it was not the case. I have to research deeper to know why didn't VFP created twice the PK.
Besides, I was not really concerned about wasting PK, as with an integer type I get 4 billion PK (including negative integers).


The reason you are not wasting primary keys is that the code to create a primary key doesn't fire unless the field is empty.

Regards,

Jim
Jim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform