60 minutes
none
To be able to plan out databases for projects.
Participants will be able to:
- become familiar with different types of data models
- (given a user flow description) identify the necessary data needed as the user moves from page to page
- (given different types of data or a user flow description) create a data model diagram to show the relationship between data
- Introduction to data models/modeling, database models, and databases.
- Data modeling is the process by which one figures out what data is needed, how it is related, and how it can be defined
- A database model is a particular type of data model that shows the relationship between data and helps you plan out what needs to be in your database and how the data needs to relate.
- A database is an organized set of data
- Data can be related for example: username, first name, last name, email address are all related to the user.
- Part of data modeling is creating data model representations or schemas showing the relationships between data.
- The different types of data models:
- Hierarchical database model
- Relational model
- Network model
- Object-oriented database model
- Entity-relationship model
- Document model
- Entity-attribute-value model
- Star schema
- The object-relational model, which combines the two that make up its name
Activating Prior knowledge (before slides)
- Give participants an example of children playing in a park. What data could be collected about the children in the park? Example responses: name, parent(s) name, hair color, school, address of school, clothing color, clothing brand, favorite food, number of siblings, names of siblings . . .
- Have students create diagrams of how this data relates.
Brief outline of slides
- Define data, data model/modeling, database
- Give example of data and how it how its relationship can be shown with a diagram
- Show different types of data model schemas
- Give an example of a database model
- Show an example of what types of data are needed given a user flow
- Show how that data is organized into a database model
Give participants different types of data and work with them to create a diagram that represents the relationship between the data.
An example could be: Imagine you are creating a food website that will have recipes by top chefs from around the world. The following data will be required:
- recipe name
- number of ingredients
- ingredients
- difficulty level
- cook time
- chef (who wrote the recipe)
- country (where the chef lives)
- city (where the chef lives)
- restaurants where the chef has worked
- chef's favorite ingredient
Create a diagram to show how the data is related.
a possible response:
another possible response:
Have participants click through a sequence on a website (like Amazon). Have participants list the data that is needed and create a diagram to show how it is related.
Participants choose one diagram they made during this lesson and find a different way to represent the relationships between the data.
Return to the children in the park and choose the most important data for a website for parents to sign their children up for extracurriculars at the park. Create a database model showing how the data is related.