Data Modeling

Background

  • What does the term ‘Data Modeling’ mean?
  • How Relational Databases work
  • Tables, Columns, Databases, Joins
  • “3d Normal Form”
  • Different approaches
  • Key question is how you correlate the tables in a database with the attributes of a class

Data Modeling

  • Crucial step in design
  • SQL vs. NOSQL databases
  • SQL Databases
    • Schema
    • Tables
    • Fields
    • Joins
  • Relationships
    • One to One (Student <-> Transcript)
    • One to Many (Student -> Car)
    • Many to Many (Student <-> Courses)
  • Careful analysis of the product requirements

Exercise

  • Team up with one other person
  • Design the data model for a music library management application like iTunes
  • 15 Minutes, ask questions
Steps
  1. What are the entities?
  2. Is something contained in something else?
  3. How many X’s are there for each Y?
  4. What kinds of facts do we need to know about each entity?
  5. What are the datatypes of those facts? Are there any ‘arrays’?
  6. Possibly identify other entities
  7. Repeat until done