Help users link tables via question-based forms #790
Replies: 6 comments 16 replies
-
@ghislaineguerin the overall flow looks good. I think before we get to the foreign key modal, we need to show a confirmation message that says something like |
Beta Was this translation helpful? Give feedback.
-
Overall
Questions
Suggestions
|
Beta Was this translation helpful? Give feedback.
-
@ghislaineguerin The flow looks good to me. I have a small thought that might make this more accessible for both non-technical and technical users. Non-technical userFor of a new user who has very little idea on databases, the above design and the 'Link to table' modal would be ideal. User who understands db terminologiesSomeone who understands database terminologies/cares about what happens on the db would be confused by the word 'Link' and by the questions, and they would not know what changes happen on the db. They might probably be more comfortable doing things manually from the constraints modal. The problem is we don't want to mislead them into thinking that we don't allow manual configurations when they click 'Link Table' button. Concern:While trying to make the UX easier for users new to databases, we do not want to make it harder for users who understand db terminologies. Suggestion:My suggestion would be to show additional text on the modal, providing more technical details for the configuration the user has chosen, and a link to where they can do it manually. Non-technical users can safely ignore this, while technical users would be more comfortable knowing this. Examples:If neither checkboxes are checked: If both checkboxes are checked: Doing the above also removes the necessity for additional confirmation. |
Beta Was this translation helpful? Give feedback.
-
@pavish @seancolsen @kgodey thanks for the comments. Some thoughts based on your comments:
|
Beta Was this translation helpful? Give feedback.
-
A couple of comments:
Overall, I really like the direction this is going, though. |
Beta Was this translation helpful? Give feedback.
-
@kgodey @pavish @mathemancer @seancolsen Unless there are any major concerns or overlooked requirements I will complete the spec for this design. |
Beta Was this translation helpful? Give feedback.
-
Problem definition
We need to implement a design solution to help users link tables based on foreign key relationships. Although an obscure construct for non-DB users, the foreign key can be a potent tool in relational databases. It allows associating single records from a table to any other table by limiting the values of a column to those that match the linked record primary key only.
There are some challenging aspects around this problem, with a high risk of creating friction for users as most data management apps create relationships in the background or provide abstractions to help create relationships. Also, some users might confuse foreign-key relationships with joins or think about outcomes produced by a join, such as having a table where multiple fields from the linked tables are present. The problem with this is that foreign keys are just constraints to enforce referential integrity so, the user will still need to use joins to achieve their desired outcome.
Suggested Design Solution
NOTE: This is a draft of the solution and does not represent the final design
Using question-based forms to help users to define, verify and assign foreign key relationships
Question-based flows can help users understand the necessary steps to achieving their goals. By capturing intentions with question-based flows, we can directly involve the user in the steps, connecting the processes and guiding them where to go next. These flows work best when there is some ambiguity on what is going to happen next. For example, a user will link tables but doesn't know the system will add a constraint.
Example of linking tables via question-based form
Assumptions
Starting point on the 'many' side of the relationship
A user has a table called 'release' containing records representing a single release, each with a unique Id number. The user wishes to create a table that will list all the releases by name and the artist(s) associated with each release.
From the table toolbar, the user will click on the 'Link Table' option. After selecting 'Link Table,' a dialog box will open with the following content:
From here, the user can select a table, prompting a couple of questions to define the relationship. In this example, the user links the 'release' table to the 'artist' table. For this first example, we'll assume that 'release' can only be linked to a single record from 'artist.'
The user answers yes or no to the questions based on their desired outcome.
A foreign-key constraint is added to the 'release' table based on the user's selected relationships. A new column named 'artistId' has also been created.
The user can now link to records from the 'artist' table.
Starting point on the 'one' side of the relationship
A user has a table called 'artist' that contains records representing a single artist. The user wishes to create a table that will list all the artists and their associated releases from a 'release' table.
From the table toolbar, the user will click on the 'Link Table' option. Like the previous example, the user will select the table they wish to link to and answer the questions.
This time, the system added a constraint to the linked table instead of where the user initiated the process—achieving the same outcome in both cases.
Starting point on any of the sides of a 'many-to-many' relationship
A user has a pair of tables 'release,' and 'artist' that they wish to link so that 'artist' is linked to multiple records from 'release' and 'release' is linked to multiple records from 'artist.'
From any of the tables on this set, the user clicks on the 'Link Table' option located in the table toolbar. However, this time, they answer 'yes' to both questions.
This time, a new table is created called 'release_artist' or 'artist_release' depending on which table the user started the process from.
The resulting table has two columns referencing the primary keys of the linked tables.
Suggested Next Steps
VIDEO: https://www.loom.com/share/e1d7d376c61145229d9c32533bff750f
Beta Was this translation helpful? Give feedback.
All reactions