Rules on using primary keys?

Rules on using primary keys?

Postby nuGent » Mon Mar 03, 2014 12:05 am

I'm a bit confused about the right approach to defining and using primary keys in nuBuilderPro.
Can I use auto-incrementing integers for all primary keys? If so, is there a catch?
Is varchar() a recommendation or the better option?
If I have a hidden internal client_id PK can I enforce a unique numeric or alphanumeric business-side client_ref with a unique index?
Any other pearls of wisdom gratefully received.

Regards
John
nuGent
 
Posts: 11
Joined: Sat Jan 18, 2014 9:56 pm

Re: Rules on using primary keys?

Postby admin » Tue Mar 04, 2014 9:50 am

John,

We strongly suggest using varchar(25) for all Primary Keys.

Here are some reasons.. http://nubuilder.blogspot.com.au/2010_0 ... chive.html

nuBuilder will automatically populate PKs.

Steven
admin
Site Admin
 
Posts: 3225
Joined: Mon Jun 15, 2009 9:53 am


Return to General