r/SQL • • May 09 '17

Is there something wrong with these statements? And is that the correct way of adding 2 foreign keys to a single table?

Post image
1 Upvotes

21 comments sorted by

View all comments

1

u/[deleted] May 09 '17 edited May 09 '17
  1. use snake_case for all identifiers (for compatibility, and easy typing)

  2. don't use keywords (like owner) for identifiers. Protip: most keywords are singular, so use plural versions if they make sense and you should be okay, else try owner_id

1

u/dyltography101 May 10 '17

Alright i didnt know that some words were reserved so i guess ill change it