Re:Mistakes Beginners Make When Working with Databases
by sopooneo on Wednesday June 08, 2016 @06:41PM
(#11866265)
I have actually done this for a classroom management app I made mostly for fun when I taught high school. At first I wanted to use the district issued ID number as the primary key for each student. Except some students came and started classes and needed attendance records before the district got around to issuing them their official numbers. So I fell back to auto-increment int as the primary key, with their "district_id" nullable, default null, but unique constrained as just another field equivalent to their first_name.
[ Parent
| on HN ]
There are no comments on this comment yet.