NORMA Multi-Page Relational View Enhanced relational view for large models. Matthew Curland ORM Solutions, LLC mcurland@live.com Multi-Page Relational View For UniBZ.it 4/24/2019
Contents What is a multi-page relational view? Why do we need one? Basic behavior Usability challenges Foreign key connector display options Future Work Multi-Page Relational View OTM 2013 4/24/2019
What is it? NORMA ships a single page relational view. All tables are shown on one page. Tables are added/removed automatically to track model changes. Multi-Page Relational View Table shapes spread across multiple diagrams. User is responsible for ensuring all tables are visible. Multi-Page Relational View OTM 2013 4/24/2019
Why? Scalability Single-page view is unusable as model grows Display of small parts of the relational model facilitates review. Multi-Page Relational View OTM 2013 4/24/2019
Basics One diagram created on extension load Additional diagrams created using menu on diagram tabs Add new table shape by: Dragging from the model browser Dragging from another diagram (including single page view) Control-Dragging from the same diagram Creates multiple shapes on the same diagram for the same table Foreign key connectors are automatically created Same algorithm as ORM diagrams Opposite shape chosen based on nearest attach points Only one shape for table A will attach to a reference shape for table B Multi-Page Relational View OTM 2013 4/24/2019
Usability Challenges Facilitate rapid population of database diagrams. Target user has large databases, it must be easy to display them. Help user know when one or more tables are missing. Includes dynamic tracking of new changes as the model changes. Help user rapidly create shapes for referenced tables. Missing shapes must be graphically discoverable. Single gesture required for new shape. Maximize graphical foreign key feedback. Graphics should indicate foreign key source and target columns. Multi-Page Relational View OTM 2013 4/24/2019
Table? What Table? Tables are not added automatically. It is not inherently obvious which tables are not shown, user needs help. Tracking is required for non-displayed tables and foreign keys. Done with a ‘Relational Shape Missing’ group type. Group automatically for each schema when when extension first loads. Shows table reference it no MPRV shape exists for that table. Shows foreign key reference if no shape for a target table exists on any diagram with a source table shape. One model error is shown if the group has any items in it. Items can be ignored by ‘deleting’ them from the group. Multi-Page Relational View OTM 2013 4/24/2019
Referenced Table Shapes Without help, a multi-step process is needed. Jump from table shape to model browser. Expand the table and foreign key items. Expand each foreign key to see referenced table. Double click the table reference node in the model browser. Drag target table onto the diagram to get the shape. Obviously, we don’t do this. Instead, foreign key arrows point away from the shape. Hovering over the arrow shows target information. Dragging and dropping the arrow creates a shape for the target table. Foreign key line is drawn automatically. Continue to follow arrows on new shape. Multi-Page Relational View OTM 2013 4/24/2019
Foreign Key Connectors Single column view shows source and target tables, but connector lines have no column affinity. Column affinity requires: Side attach points at a specific spot. Complex attach points for multi-column joins, drawn like external constraint attach points to non-adjacent roles in a fact type. Stacked ‘channels’ to accurately display overlapping constraint attachment. Drawbacks of exact attach points: Connector lines have more bends in them. Lots of overlap because it is very common for multiple lines to target the same column. Attaches to shape sides only, not top and bottom. Multi-Page Relational View OTM 2013 4/24/2019
Display Options All options have global default plus override on a local diagram. Data type display (show or hide) Foreign Key Column Display Allows line display to be simplified by reducing exact attach points. Attach options Source columns to target columns Source columns to target table Source table to target table Line Jumps (on or off) Unattached foreign key display Hide unattached arrows depending on foreign key display state. Multi-Page Relational View OTM 2013 4/24/2019
Future Work Inside of the table shape needs graphical display Glyphs for primary and secondary uniqueness Alternately, use vertical ORM-style uniqueness display Column and table coloring Enable web browser display Global option already exists to save line routing information Multi-Page Relational View OTM 2013 4/24/2019