Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Introduction to Database Design / ER Diagrams          Intro to Database Design          with Entity-Relationship         ...
Introduction to Database Design / ER Diagrams                 Pop Quiz!   17 May 2012                   © 2012 Mark Abrams...
Introduction to Database Design / ER Diagrams                                                          THEORY &           ...
Introduction to Database Design / ER Diagrams                 About Me (and disclosures)   •   Schema-first kind of guy   ...
Introduction to Database Design / ER Diagrams                 What is a database design?   17 May 2012                   ©...
Introduction to Database Design / ER Diagrams                 What’s the data look like? SalesOrderId    OrderStatus   Ord...
Introduction to Database Design / ER Diagrams                  Why Database Design?   • Gives everyone a clear picture of ...
Introduction to Database Design / ER Diagrams                 Entity / Relationship Model   • An Entity is some “thing” of...
Introduction to Database Design / ER Diagrams                                       Entity   •   Definition   •   Attribut...
Introduction to Database Design / ER Diagrams                               Relationship   • Definition   • Identifying   ...
Introduction to Database Design / ER Diagrams                           Relationship (2)   • Recursive references   • Asso...
Introduction to Database Design / ER Diagrams                                 Cardinality   • How many instances of each e...
Introduction to Database Design / ER Diagrams                                         Keys   •   Primary Keys   •   Foreig...
Introduction to Database Design / ER Diagrams                                 Normalization                               ...
Introduction to Database Design / ER Diagrams                             Getting Fancy   •   First, second, third-normal ...
Introduction to Database Design / ER Diagrams                                Questions?   • 1 Exercise   • Demo   • Questi...
Introduction to Database Design / ER Diagrams                 Exercise! Legacy Baggage   17 May 2012                   © 2...
Introduction to Database Design / ER Diagrams            Tools for Creating Your Model   • Paper + Pen / Whiteboard   • Dr...
Introduction to Database Design / ER Diagrams                               Demo time!   • SQL Server Management Studio (“...
Introduction to Database Design / ER Diagrams                                           Resources                 Designin...
Introduction to Database Design / ER Diagrams   SQL Server SF Group                                              Red Gate ...
Prochain SlideShare
Chargement dans…5
×

Introduction to database design with Idef1X entity relationship (ER) diagrams

7 628 vues

Publié le

Tonight I delivered a fun presentation on the topic of designing a relational database using entity relationship diagrams. The group was very diverse (QA, Product Managers, DBAs, Software Architects, startup folks, etc.) and we had a great time talking about the nuts and bolts of designing a database.

Publié dans : Technologie, Business
  • Soyez le premier à commenter

Introduction to database design with Idef1X entity relationship (ER) diagrams

  1. 1. Introduction to Database Design / ER Diagrams Intro to Database Design with Entity-Relationship (ER) Diagrams Mark Abramson, CEO, Forward Thought, Inc. 17 May 2012 © 2012 Mark Abramson / @mark__a 1
  2. 2. Introduction to Database Design / ER Diagrams Pop Quiz! 17 May 2012 © 2012 Mark Abramson / @mark__a 2
  3. 3. Introduction to Database Design / ER Diagrams THEORY & ELEMENTS DEMO Q&A Edgar F Codd 17 May 2012 © 2012 Mark Abramson / @mark__a 3
  4. 4. Introduction to Database Design / ER Diagrams About Me (and disclosures) • Schema-first kind of guy • MS BizSpark Startup Partner • www.bizsparksf.com • Friend of Red Gate • @mark__a • linkedin.com/in/abramsonmark 17 May 2012 © 2012 Mark Abramson / @mark__a 4
  5. 5. Introduction to Database Design / ER Diagrams What is a database design? 17 May 2012 © 2012 Mark Abramson / @mark__a 5
  6. 6. Introduction to Database Design / ER Diagrams What’s the data look like? SalesOrderId OrderStatus OrderDate PlacedBy IsPriorityOrder CustomerId CurrencyId 20001 Shipped 1/5/2011 Bob Smith 0 3 2 20002 Fulfillment 5/5/2011 John Doe 1 2 2 20003 Placed 5/7/2011 Brenda Lee 0 3 2 CustomerId CustomerName AccountNumber 1 Woolworths 838382 2 Ricks Café 291101 3 Mill Valley Market 957588 17 May 2012 © 2012 Mark Abramson / @mark__a 6
  7. 7. Introduction to Database Design / ER Diagrams Why Database Design? • Gives everyone a clear picture of your business rules and the data behind it • Build consensus across business units • Separation of concerns • Ensure data accuracy 17 May 2012 © 2012 Mark Abramson / @mark__a 7
  8. 8. Introduction to Database Design / ER Diagrams Entity / Relationship Model • An Entity is some “thing” of interest • A Relationship defines the interaction between one or more Entities Contains 17 May 2012 © 2012 Mark Abramson / @mark__a 8
  9. 9. Introduction to Database Design / ER Diagrams Entity • Definition • Attributes • Data Types • NULL option • Primary Key • Foreign Key • Identity Columns 17 May 2012 © 2012 Mark Abramson / @mark__a 9
  10. 10. Introduction to Database Design / ER Diagrams Relationship • Definition • Identifying • Non-Identifying Non-Identifying Relationship 17 May 2012 © 2012 Mark Abramson / @mark__a 10
  11. 11. Introduction to Database Design / ER Diagrams Relationship (2) • Recursive references • Associative / Many-To-Many / “Join Tables” 17 May 2012 © 2012 Mark Abramson / @mark__a 11
  12. 12. Introduction to Database Design / ER Diagrams Cardinality • How many instances of each entity may be involved or must be involved? 17 May 2012 © 2012 Mark Abramson / @mark__a 12
  13. 13. Introduction to Database Design / ER Diagrams Keys • Primary Keys • Foreign Keys • Candidate Keys • Composite Keys 17 May 2012 © 2012 Mark Abramson / @mark__a 13
  14. 14. Introduction to Database Design / ER Diagrams Normalization DenormalizationSalesOrderId OrderStatus OrderDate PlacedBy CustomerAccountNumber CreditLimit20001 Shipped 1/5/2011 Bob Smith 838382 500020002 Fulfillment 5/5/2011 John Doe 291101 1000020003 Placed 5/7/2011 Brenda Lee 957588 7500 Normalization 17 May 2012 © 2012 Mark Abramson / @mark__a 14
  15. 15. Introduction to Database Design / ER Diagrams Getting Fancy • First, second, third-normal form • Generalization • Nonspecific relations • Three-way relationships • Constraints • Referential Integrity actions / triggers • Zachman’s Framework 17 May 2012 © 2012 Mark Abramson / @mark__a 15
  16. 16. Introduction to Database Design / ER Diagrams Questions? • 1 Exercise • Demo • Questions + wrap up 17 May 2012 © 2012 Mark Abramson / @mark__a 16
  17. 17. Introduction to Database Design / ER Diagrams Exercise! Legacy Baggage 17 May 2012 © 2012 Mark Abramson / @mark__a 17
  18. 18. Introduction to Database Design / ER Diagrams Tools for Creating Your Model • Paper + Pen / Whiteboard • Drawing Tools: PowerPoint, Visio • ER Tools: Open Source / Community Editions – CA ERWin; Toad; SSMS; MySQL Workbench • ER Tools: Midrange – Sparx Systems EA $199; Toad $479 • ER Tools: High End – CA ERWin $4000; Embarcadero $2000 17 May 2012 © 2012 Mark Abramson / @mark__a 18
  19. 19. Introduction to Database Design / ER Diagrams Demo time! • SQL Server Management Studio (“free”) – http://www.microsoft.com/download/en/details.aspx?id=7593 • RedGate SQL Data Generator ($295) – http://www.red-gate.com/products/sql-development/sql-data-generator/ • RedGate SQL Prompt Pro ($295) – http://www.red-gate.com/products/sql-development/sql-prompt/ • CA ERWin ($3975) – http://erwin.com/products/ • Tabs Studio ($49) – http://www.tabsstudio.com 17 May 2012 © 2012 Mark Abramson / @mark__a 19
  20. 20. Introduction to Database Design / ER Diagrams Resources Designing Quality Databases With Idef1X SQL in a Nutshell: A Desktop Quick Reference Information Models Kevin Kline, Brand Hunt, Daniel Kline Thomas A., M.D. Bruce $18 on Amazon $3.91 on Amazon! The Data Model Resource Book, Vol. 1: A http://www.databaseanswers.org/data_models Library of Universal Data Models for All Repository of simple examples of db models Enterprises Free! Len Silverston $45 (also check out Vol. 2 and Vol. 3) http://publib.boulder.ibm.com/infocenter/wc Image Credits help/v5r6/index.jsp?topic=/com.ibm.commer Slide 1: flickr/besser.jetzt ce.data.doc/refs/rdmindex.htm Slide 2: IBM IBM WebSphere data model Slide 3: flickr/Pete Reed Also search for ER Diagrams for other large Slide 4: flickr/Artful Magpie systems to see how someone else addressed a set of entities and relationships (MS Slide 14: Amazon.com Dynamics, SAP, etc.) Slide 15: flickr/Jon Ashcroft All ER diagrams: Mark Abramson www.StackOverflow.com 17 May 2012 © 2012 Mark Abramson / @mark__a 20
  21. 21. Introduction to Database Design / ER Diagrams SQL Server SF Group Red Gate Mark Ginnebaugh Edgar Codd Attendees Loving Wife Thomas Bruce Mom + Dad 17 May 2012 © 2012 Mark Abramson / @mark__a 21

×