Handling duplicate foreign key columns from the 'Link Table' dialog #791
Replies: 3 comments 4 replies
-
The warning is a good idea and would be nice in some cases -- but it would be more work to implement, so I'd say let's deprioritize it for now but consider adding it later. The warning is not that important because adding a new link is a very low-risk operation which the user can easily undo.
Yes, though I'd propose |
Beta Was this translation helpful? Give feedback.
-
I think it could be useful to ask the user to name the link after the user fills out the first two questions. We can pre-fill I don't think we need a warning. |
Beta Was this translation helpful? Give feedback.
-
Please also note that foreign keys can be self-referential (referring to the same table). For example, imagine a Person table.
Here, I'm not sure if this affects the user experience, but I wanted to mention it just in case. |
Beta Was this translation helpful? Give feedback.
-
Problem
The 'Link Table' dialog can help users quickly set up the appropriate columns and constraints to link tables across a schema. However, there's no way to let the user know a foreign key constraint already exists.
In some cases, the user might want to do this intentionally. For example, imagine a scenario where a 'track' has a column for both 'artist' and 'featured artist,' both containing FK constraints that are the same.
Question 1
Should we have a warning and then explain to the user that we'll add a new column anyways?
Question 2
Would the new column be auto-named as 'artistId(2)' or similar?
Beta Was this translation helpful? Give feedback.
All reactions