From (User) Story to Tables Reading between the lines to find and understand your data
WARNING! Literary Geekiness may ensue! You may be asked to participate! From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
What’s my story? Working as a DBA for 18 years SQL Saturday and User Group Speaker NESQL Board member Random facts: I’m the alto section leader in my choir. I go to bluegrass jams regularly. I’ve been learning guitar and now mandolin. I am a bit of a musical theater geek. I majored in English and History. The English & History background explains a lot of why I’m approaching things this way. From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Data & Story From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Agile Methodology “Agile Software Development is an umbrella term for a set of methods and practices based on the values and principles expressed in the Agile Manifesto. Solutions evolve through collaboration between self- organizing, cross-functional teams utilizing the appropriate practices for their context.” https://www.agilealliance.org/agile101/ https://www.agilealliance.org/agile101/ From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
User Stories Agile development breaks workloads into “stories” “As this type of user, I want to be able to ….” The goal is to be able to take these stories and translate them into our application functionality and understand what the data requirements. From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Let’s treat user stories as literature… From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
How do we interpret literature? Looking at sentence structure and syntax Applying context clues Applying outside knowledge of the subject matter From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Diagramming Sentences Talk about the purpose of diagramming sentences – not to learn the different parts of speech but to understand the relationship between them and get a better grasp of the sentence structure overall. Point out how similar the diagram is to a data model. Link to the NPR article: http://www.npr.org/sections/ed/2014/08/22/341898975/a-picture-of-language-the-fading-art-of-diagramming-sentences Link to diagrammed famous first sentences: https://www.popchartlab.com/products/a-diagrammatical-dissertation-on-opening-lines-of-notable-novels
Steps for Diagramming Sentences Identify the part of speech for each word Identify how the words are related to each other Create the diagram From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Steps for Modeling Data Identify the data points Identify the implied information related to the data points Create the models From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Identify the Data Points Address Information: Not quite specific in terms of address lines The word “present” implies multiple address types Name Information: Only asking for full name and not the different name parts From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Identify additional information Business knowledge Using universal data models Len Silverston Michael Blaha David Hay Ralph Kimbell William Inmon Etc. “Just Enough Design Upfront” From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Create the Models Conceptual Logical Physical From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Types of Models Relational Star Schema Normal Forms Designed for fast writes Often used for OLTP systems Facts and Dimensions Designed for fast reads Often used for OLAP/Data warehouses or marts/BI Solutions From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Here’s a story (or two) we can use… Let’s practice Here’s a story (or two) we can use… Options: First line of Moby Dick – “Call me Ishmael” Any other example from the link in NPR article: Metamorphosis. Pride and Prejudice First line of the Hobbit or Harry Potter From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Story 1: Moby Dick From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Story 2… From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Why is this important? Understanding how to better break down the tasks better as part of the Agile development process. Including database design at an earlier point of the overall design process. “Shifting Left” Determining the why, when, how the technical details of database design should be applied. Understanding how the database impacts the company’s business = Job Security! From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Obstacles to this process Requirements Inaccurate information Scope creep Unforeseen changes Inability to see full picture Communication Communication styles Office culture & politics From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Additional Reading Diagramming sentences: Agile Methodology Modeling: Article on NPR: http://www.npr.org/sections/ed/2014/08/22/341898975/a-picture-of-language-the- fading-art-of-diagramming-sentences Agile Methodology The Agile Alliance: https://www.agilealliance.org Modeling: Descriptions of the different types of models (Karen Lopez): http://www.datamodel.com/index.php/articles/what-are-conceptual-logical-and-physical-data- models/ “Just Enough Design Upfront”: Agile Data Warehouse Design by Lawrence Corr with Jim Stagnitto. The importance and implication of better understanding data requirements: Pushing for database development to be earlier in the process (Stephanie Herr): https://www.simple- talk.com/sql/database-devops-sql/devops-shift-left-databases/ The conclusion about the role of the DBA building solutions and understanding the data (Thomas LaRock): https://thomaslarock.com/2017/02/what-does-a-dba-do-all-day/ Hopefully I will have touched most of these points earlier in the presentation. The descriptions are why I’m including them. Link to Agile Data Warehouse Design on Amazon: https://www.amazon.com/Agile-Data-Warehouse-Design-Collaborative/dp/0956817203 From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Data Modeling Tools ER/Studio Data Architect erwin Data Modeler https://www.idera.com/er-studio-data-architect-software erwin Data Modeler https://erwin.com/products/data-modeler/ Model Right http://www.modelright.com/ SQL Database Modeler https://sqldbm.com/en/Home/ ER/Studio Data Architect: https://www.idera.com/er-studio-data-architect-software erwin Data Modeler: https://erwin.com/products/data-modeler/ Model Right: http://www.modelright.com/ SQL Database Modeler: https://sqldbm.com/en/Home/ From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin
Have More Questions? Let me know! Email: Twitter: @dgmelkin Blog: DebtheDBA.wordpress.com dgmelkin@gmail.com Please fill out your speaker evaluation form! From (User) Story To Tables | Deborah Melkin | dgmelkin@gmail.com | @dgmelkin