One-to-Many Table Relationship #598
Replies: 5 comments 25 replies
-
@ghislaineguerin This looks good. Some feedback: (1) I think it would be good to display the first (non-primary key) column of the referenced table in the same column, similar to the dropdown for selecting a new record. (2) There may be thousands or millions of records in the table that's being referenced. We need a way to link the correct record. We probably need some sort of search and autocomplete while linking records. Search should probably account for other fields in the table, not just the PK (e.g. if I want to link (3) I don't think we need the "From Referenced Tables" subheader in the table constraints section, all constraints are the same from the DB point of view. Can we find a different way to convey what you're trying to convey here? Maybe a tooltip? (4) I think we might want different icons for primary keys and foreign keys to make the distinction clearer. Maybe some sort of "link" icon for FKs? |
Beta Was this translation helpful? Give feedback.
-
A couple of things I noticed:
The usual options for what to do when a referenced value is deleted are:
Relevant docs: https://www.postgresql.org/docs/13/ddl-constraints.html#DDL-CONSTRAINTS-FK |
Beta Was this translation helpful? Give feedback.
-
@ghislaineguerin @kgodey I have a few questions and thoughts: In the menu
The table
We also need to factor in how the UI will look when there is a one-many or many-one relationship involved. Since the menu options and modal is going to be similar for all three, it is better to start development work after we define the UX for all three. Or else, each design iteration will result in a complete rework on the frontend. |
Beta Was this translation helpful? Give feedback.
-
@mathemancer @pavish @ghislaineguerin FYI I renamed the spec in the wiki to be "one-to-many" and updated the link in the description. |
Beta Was this translation helpful? Give feedback.
-
Based on the new action plan from the 2021-10-15 meeting, we're going to update the design requirements for issues in this milestone, including this one. |
Beta Was this translation helpful? Give feedback.
-
The design for issue #243 is ready for review. Please follow the Review Guidelines and make sure to review before the set deadline expires.
Document
https://wiki.mathesar.org/en/design/specs/views-one-to-many-relationships
Reviewers
@kgodey @pavish Your review is required.
Feedback from the community is also welcome. More context about Mathesar's design strategy can be found here.
Deadline
The deadline for submitting feedback is set 2 days from now, on Friday 26th.
Beta Was this translation helpful? Give feedback.
All reactions