View Single Post
  #1 (permalink)  
Old May 12th, 2014, 12:46 PM
frdata frdata is offline
Authorized User
Points: 80, Level: 1
Points: 80, Level: 1 Points: 80, Level: 1 Points: 80, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Nov 2011
Posts: 20
Thanks: 7
Thanked 0 Times in 0 Posts
Default Concatenated Surrogate Key replacing AutoNumber Key

Hi Rod,

The more I read your book, the more I discover precious gems hidden in it.

I'm creating a surrogate key, StudentRefNo, in Students table for new students registration. (I already have a composite unique constraint on some other fields to determine uniqueness)

The format is yyyynnnn. For 2014, it would become 20140001, 20140002 etc. (New enrollment is only around 1000 students per year)

The numbering would not necessarily be sequential but guaranted to be unique because of the unique constraint placed on the StudentRefNo field.

My question is, do I still need to create any AutoNumber StudentID field for this table?

Would I just go ahead and set the StudentRefNo as Primary Key and not require the AutoNumber StudentID field at all?

Thank you