SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
Yes! Database Design can be this fun,[object Object],Mark Abramson, CEO, Forward Thought, Inc.,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],1,[object Object],@mark__a,[object Object]
THEORY & ELEMENTS ,[object Object],DEMO,[object Object],Q&A,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],2,[object Object],Edgar F Codd,[object Object]
Microsoft BizSpark Startup Partner,[object Object],Organizer of BizSparkSFMeetup Group,[object Object],Regular customer of all tools used in demo,[object Object],Schema-first kind of guy,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],3,[object Object],Disclosures,[object Object]
What is a database design?,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],4,[object Object]
Why Database Design?,[object Object],Gives everyone a clear picture of your business rules and the data behind it,[object Object],Build consensus across business units,[object Object],Separation of concerns,[object Object],Ensure data accuracy,[object Object],Fun,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],5,[object Object]
Entity / Relationship Model,[object Object],An Entity is some “thing” of interest,[object Object],A Relationship defines the interaction between one or more Entities,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],6,[object Object]
What’s the data look like?,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],7,[object Object]
Entity,[object Object],Definition,[object Object],Attributes,[object Object],Data Types,[object Object],NULL option,[object Object],Primary Key,[object Object],Foreign Key,[object Object],Identity Columns,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],8,[object Object]
Relationship,[object Object],Definition,[object Object],Identifying,[object Object],Non-Identifying,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],9,[object Object],Non-Identifying Relationship,[object Object]
Relationship (2),[object Object],Recursive references,[object Object],Associative / Many-To-Many /“Join Tables”,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],10,[object Object]
Cardinality,[object Object],How many instances of each entity may be involved or must be involved?,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],11,[object Object]
Keys,[object Object],Primary Keys,[object Object],Foreign Keys,[object Object],Candidate Keys,[object Object],Composite Keys,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],12,[object Object]
Normalization,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],13,[object Object],Denormalization,[object Object],Normalization,[object Object]
Getting Fancy,[object Object],First, second, third-normal form,[object Object],Generalization,[object Object],Nonspecific relations,[object Object],Three-way relationships,[object Object],Constraints,[object Object],Referential Integrity actions,[object Object],Zachman’s Framework,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],14,[object Object]
Exercise! Legacy Baggage,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],15,[object Object]
Tools for Creating Your Model,[object Object],Paper + Pen / Whiteboard,[object Object],Drawing Tools: PowerPoint, Visio,[object Object],ER Tools: Open Source / Community Editions,[object Object],CA ERWin; Toad; SSMS; MySQL Workbench,[object Object],ER Tools: Midrange,[object Object],Sparx Systems EA $199; Toad $479,[object Object],ER Tools: High End,[object Object],CA ERWin $4000; Embarcadero $2000,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],16,[object Object]
Demo time!,[object Object],SQL Server Management Studio (“free”),[object Object],http://www.microsoft.com/download/en/details.aspx?id=7593,[object Object],RedGate SQL Data Generator ($295),[object Object],http://www.red-gate.com/products/sql-development/sql-data-generator/,[object Object],RedGate SQL Prompt Pro ($295),[object Object],http://www.red-gate.com/products/sql-development/sql-prompt/,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],17,[object Object]
Resources,[object Object],10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],18,[object Object],Designing Quality Databases With Idef1X Information Models,[object Object],Thomas A., M.D. Bruce,[object Object],$3.91 on Amazon!,[object Object],SQL in a Nutshell: A Desktop Quick Reference,[object Object],Kevin Kline, Brand Hunt, Daniel Kline,[object Object],$18 on Amazon,[object Object],The Data Model Resource Book, Vol. 1: A Library of Universal Data Models for All Enterprises,[object Object],Len Silverston,[object Object],$45,[object Object],(also check out Vol. 2 and Vol. 3),[object Object],http://www.databaseanswers.org/data_models,[object Object],Repository of simple examples of db models,[object Object],Free!,[object Object],http://publib.boulder.ibm.com/infocenter/wchelp/v5r6/index.jsp?topic=/com.ibm.commerce.data.doc/refs/rdmindex.htm,[object Object],IBM WebSphere data model,[object Object],Also search for ER Diagrams for other large systems to see how someone else addressed a set of entities and relationships (MS Dynamics, SAP, etc.),[object Object],Image Credits,[object Object],Slide 1: flickr/besser.jetzt,[object Object],Slide 2: IBM,[object Object],Slide 3: flickr/Pete Reed,[object Object],Slide 4: flickr/Artful Magpie,[object Object],Slide 14: Amazon.com,[object Object],Slide 15: flickr/Jon Ashcroft,[object Object],All ER diagrams: Mark Abramson,[object Object],www.StackOverflow.com,[object Object]
10/9/2011,[object Object],© 2011 Mark Abramson / #svcc,[object Object],19,[object Object],SV Code Camp,[object Object],Peter Kellner,[object Object],Edgar Codd,[object Object],Attendees,[object Object],Loving Wife,[object Object],Thomas Bruce,[object Object],Mom + Dad,[object Object]

Contenu connexe

Similaire à Introduction to Database Design with Entity Relationship Diagrams

Java EE 7 from an HTML5 Perspective, JavaLand 2015
Java EE 7 from an HTML5 Perspective, JavaLand 2015Java EE 7 from an HTML5 Perspective, JavaLand 2015
Java EE 7 from an HTML5 Perspective, JavaLand 2015Edward Burns
 
CEFRIEL-DEI_DellaValle-Facca_SWE-ET
CEFRIEL-DEI_DellaValle-Facca_SWE-ETCEFRIEL-DEI_DellaValle-Facca_SWE-ET
CEFRIEL-DEI_DellaValle-Facca_SWE-ETEmanuele Della Valle
 
Soprex framework on .net in action
Soprex framework on .net in actionSoprex framework on .net in action
Soprex framework on .net in actionMilan Vukoje
 
Building appsinsilverlight4 part_1
Building appsinsilverlight4 part_1Building appsinsilverlight4 part_1
Building appsinsilverlight4 part_1Dennis Perlot
 
Entity Framework V1 and V2
Entity Framework V1 and V2Entity Framework V1 and V2
Entity Framework V1 and V2ukdpe
 
2015-05-19-resume
2015-05-19-resume2015-05-19-resume
2015-05-19-resumeLee Norris
 
Windows Phone 7.5 Mango - What's New
Windows Phone 7.5 Mango - What's NewWindows Phone 7.5 Mango - What's New
Windows Phone 7.5 Mango - What's NewSascha Corti
 
Brian Hogg - Web Apps using HTML5 and JS
Brian Hogg - Web Apps using HTML5 and JSBrian Hogg - Web Apps using HTML5 and JS
Brian Hogg - Web Apps using HTML5 and JS#DevTO
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patternsukdpe
 
01 introduction to entity framework
01   introduction to entity framework01   introduction to entity framework
01 introduction to entity frameworkMaxim Shaptala
 
Web Service Presentation
Web Service PresentationWeb Service Presentation
Web Service Presentationguest0df6b0
 
Curriculum Vitae - Simon Teff - 2016
Curriculum Vitae - Simon Teff - 2016Curriculum Vitae - Simon Teff - 2016
Curriculum Vitae - Simon Teff - 2016Simon Teff
 
Workflow Design to Increase Compliance with Oracle Workflow / Oracle APEX
Workflow Design to Increase Compliance with Oracle Workflow / Oracle APEXWorkflow Design to Increase Compliance with Oracle Workflow / Oracle APEX
Workflow Design to Increase Compliance with Oracle Workflow / Oracle APEXRachelBarker26
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?ukdpe
 
Application Engine ETL
Application Engine ETLApplication Engine ETL
Application Engine ETLkabrilake
 
Microsoft Technologies for Data Science sql_saturday_201505
Microsoft Technologies for Data Science sql_saturday_201505Microsoft Technologies for Data Science sql_saturday_201505
Microsoft Technologies for Data Science sql_saturday_201505Mark Tabladillo
 
Building a Testable Data Access Layer
Building a Testable Data Access LayerBuilding a Testable Data Access Layer
Building a Testable Data Access LayerTodd Anglin
 

Similaire à Introduction to Database Design with Entity Relationship Diagrams (20)

Java EE 7 from an HTML5 Perspective, JavaLand 2015
Java EE 7 from an HTML5 Perspective, JavaLand 2015Java EE 7 from an HTML5 Perspective, JavaLand 2015
Java EE 7 from an HTML5 Perspective, JavaLand 2015
 
CEFRIEL-DEI_DellaValle-Facca_SWE-ET
CEFRIEL-DEI_DellaValle-Facca_SWE-ETCEFRIEL-DEI_DellaValle-Facca_SWE-ET
CEFRIEL-DEI_DellaValle-Facca_SWE-ET
 
Soprex framework on .net in action
Soprex framework on .net in actionSoprex framework on .net in action
Soprex framework on .net in action
 
Building appsinsilverlight4 part_1
Building appsinsilverlight4 part_1Building appsinsilverlight4 part_1
Building appsinsilverlight4 part_1
 
Entity Framework V1 and V2
Entity Framework V1 and V2Entity Framework V1 and V2
Entity Framework V1 and V2
 
Resume
ResumeResume
Resume
 
2015-05-19-resume
2015-05-19-resume2015-05-19-resume
2015-05-19-resume
 
Windows Phone 7.5 Mango - What's New
Windows Phone 7.5 Mango - What's NewWindows Phone 7.5 Mango - What's New
Windows Phone 7.5 Mango - What's New
 
Brian Hogg - Web Apps using HTML5 and JS
Brian Hogg - Web Apps using HTML5 and JSBrian Hogg - Web Apps using HTML5 and JS
Brian Hogg - Web Apps using HTML5 and JS
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patterns
 
01 introduction to entity framework
01   introduction to entity framework01   introduction to entity framework
01 introduction to entity framework
 
01 introduction to entity framework
01   introduction to entity framework01   introduction to entity framework
01 introduction to entity framework
 
Web Service Presentation
Web Service PresentationWeb Service Presentation
Web Service Presentation
 
Curriculum Vitae - Simon Teff - 2016
Curriculum Vitae - Simon Teff - 2016Curriculum Vitae - Simon Teff - 2016
Curriculum Vitae - Simon Teff - 2016
 
resume-SIddharthLamba
resume-SIddharthLambaresume-SIddharthLamba
resume-SIddharthLamba
 
Workflow Design to Increase Compliance with Oracle Workflow / Oracle APEX
Workflow Design to Increase Compliance with Oracle Workflow / Oracle APEXWorkflow Design to Increase Compliance with Oracle Workflow / Oracle APEX
Workflow Design to Increase Compliance with Oracle Workflow / Oracle APEX
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
 
Application Engine ETL
Application Engine ETLApplication Engine ETL
Application Engine ETL
 
Microsoft Technologies for Data Science sql_saturday_201505
Microsoft Technologies for Data Science sql_saturday_201505Microsoft Technologies for Data Science sql_saturday_201505
Microsoft Technologies for Data Science sql_saturday_201505
 
Building a Testable Data Access Layer
Building a Testable Data Access LayerBuilding a Testable Data Access Layer
Building a Testable Data Access Layer
 

Dernier

Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfinfogdgmi
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopBachir Benyammi
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 

Dernier (20)

Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdf
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 Workshop
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 

Introduction to Database Design with Entity Relationship Diagrams

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.

Notes de l'éditeur

  1. 25-30 minutes of instruction, 15-20 minutes of demo, 30+ minutes of Q&AI hope I’ll address most of your questions, so write them down + let’s talk about them at the end of the slidesBut if you don’t understand something, please interruptFirst off, I’d like to see where you’re at – where are you with your understanding and experience w/modeling?Comfy with SQL? Write a join query? Have done modeling before? Dealing with someone else’s mess
  2. Edgar F.Codd – British IBM researcher, regarded as the inventor of the relational model for database managementGOALS FOR SESSION: At the end of this session, you should be able to read, understand and create database Entity Relationship diagramsThere will be a couple of exercises for the audience as we go and an Interactive demoQ&A – very curious about what you’re facing out there in the world
  3. Want you to know of any bias that may affect my talkCheck out November 7thMeetup all about Tools, Tools and More Toolswww.bizsparksf.com
  4. Visual representation of the ENTITIES and RELATIONSHIPS between themBased on rules from the real world / your business; Entails a number of rules, standards and guidelinesGreat way to communicate with co-workers, customers, developers; Great working model and critical reference documentYou could consider this as a whole bunch of linked-together Excel worksheets: these fields define the columnsWorking with a model is 50% science, 50% art, 50% experience
  5. C’mon, you have to put all that data *somewhere*!Fun? YES! It’s a great mental exercise that forces you to think through a lot of hard problemsSeparation of Concerns (1974, check Wikipedia)
  6. Entity = object that is important to the business.Entity = the NOUNRelationship = how are these objects/entities relating to one another?Relationship = the VERB; the VERB PHRASE
  7. CustomerId in SalesOrder table references a record/row in the Customer tableWe can look up / refer to related or seemingly unrelated data elsewhere
  8. What’s in a name?Naming conventions – singular vs. plural DESCRIBE THE BUSINESSAttribute = property of an Entity = Columns of database tableData type choice (decimal vs. float vs. money) varchar vs. nvarchar vs. char vs. textNULL option – is this attribute mandatory or required per business rules?Primary Key: unique identifier for each row of dataForeign Key: some other entity’s primary key that appears here due to some relationship between the twoIDENTITY column: guarantees uniqueness and auto-increments (autonumber). (1,1) specifies the SEED and INCREMENT
  9. Not just a Facebook statusA relationship is the “verb” between entities – defines how they interact per business rulesNaming / “writing a sentence”Defines how the entities interactRead the relationship from parent->child (end with the dot)Identifying: the child is dependent on its parent for its identityNon-identifying: may be existence dependent but not identity dependent
  10. Sometimes we end up with odd relationships and don’t know whyAssociative / link / join / junction table: used for many-to-many tablesCan make joins a little more difficult but is a common patternGREAT for when you want to use an entity in other areas, e.g. Customer<->Address and Person<->Address
  11. Cardinality: how many instances of each entity may be involved or must be involved?w/ identifying – there has to be one Customer for some # of Addressw/ non-identifying – no requirement to have a Customer to have an Address (could be an Employee Address, Order Address, etc.)<nothing> One-to-zero-or-more:<P> one to one or more<Z> one to zero or one<N> one to exactly Nw/ non-identifying relationships, these can all be zero-or-one-to…
  12. Primary Key – unique identifying key (can be any data type as long as it’s unique)Foreign Key – some other entity’s PK that appears here because of some relationship with itCandidate Key – Could this work as a PK? What’s are the candidate keys in this table?Composite Key – put a few fields together to get a unique keyStrings? Timestamps? Integers? Decimals?
  13. DENORMALIZED:Data can be duplicated and get out of syncEase of queryingPerformance considerationsNORMALIZED:One “fact” occurs in one place and only one placeRequires you to get the business rules “right”No way to have data concurrency issuesDoes require a lot of joins
  14. Great opportunities for self-directed learningCascading deletes
  15. In some ways it’s easier to create than repair… let’s work together to see how we can improve this modelFirstName/LastName fields long enough?StateProvince field?Website (255) OK?Are all of these fields really OK to be nulls?WTF is OwnerId doing in Country? State?Is StateCode and CountryCode OK for a PK? Why not a bigint?Relationships in wrong directionDenormalizedInfo? What is this? A flag?
  16. Features + benefits of these as you go up/down the food chain