68 SQL Constraints
68.2 Foreign Key
68.3 Unique
UserId PK Email –
Person PersonKey int TcIdentityNo string unique
68.4 Not null
68.5 Default value
created_at default datetime(‘now’)
68.6 Check (Custom constraints)
Appointments StartDateTime EndDateTime check(EndDateTime > StartDateTime), check(StartDateTime > datetime(‘now’)),
TcIdentityNo, custom function to checksum number Name, custom function to check no punctuation and numbers
Invoice Total check(total > 0)