Understanding SQL Relationships, Foreign Keys and Inner Joins