I’m just getting started working with foreign keys for the first time and I’m wondering if there’s a standard naming scheme to use for them?
Given these tables:
task (id, userid, title) note (id, taskid, userid, note); user (id, name)
Where Tasks have Notes, Tasks are owned by Users, and Users author Notes.
How would the three foreign keys be named in this situation? Or alternatively, does it even matter at all?
Update: This question is about foreign key names, not field names!
Leave an answer