A data model is a reusable dataset made from raw data after cleaning and encoding the business rules needed for analysis. It gives shared definitions for entities such as customers, vehicles, and purchases, so later work starts from a consistent representation rather than repeated filtering and interpretation. section 3.0 section 3.1
Figure 3.1 Data modeling and analysis as mapped to the data science process
Data modeling sits between raw data and analysis: it turns data into a useful, analysis-ready form before insight is produced. section 3.1
Build a model around the question it must answer:
- Define ambiguous business terms with stakeholders, then encode those definitions in the data. section 3.1.1
- Clean recurring issues, reconcile duplicates, and reshape data into a useful common structure. section 3.1.1 section 3.5.1
- Choose the grain and schema deliberately—for example, one row per customer—and aggregate or retain fields accordingly. section 3.3.1
- Assess missingness and uncertainty rather than treating a best-guess model as complete ground truth. section 3.4.4
Counting customers across systems
To answer “How many customers do we have?”, consolidate three customer sources into one row per customer, deduplicate overlapping records, and make counting rows the minimum viable answer. Company and individual names may require text similarity, graph-based linking, or simpler matching decisions. The resulting count remains conditional on assumptions and incomplete records. section 3.0 section 3.2.3 section 3.4.4
Table 3.2 The same football results in a long format, one row per match participant
|
Match ID
|
Date
|
Competition
|
Round
|
Team
|
Home or away?
|
Goals scored
|
|---|---|---|---|---|---|---|
|
1
|
2014-07-04
|
World Cup 2014
|
Quarter-final
|
France
|
Home
|
0
|
|
1
|
2014-07-04
|
World Cup 2014
|
Quarter-final
|
Germany
|
Away
|
1
|
|
2
|
2014-07-04
|
World Cup 2014
|
Quarter-final
|
Brazil
|
Home
|
2
|
|
2
|
2014-07-04
|
World Cup 2014
|
Quarter-final
|
Colombia
|
Away
|
1
|
|
3
|
2014-07-05
|
World Cup 2014
|
Quarter-final
|
Argentina
|
Home
|
1
|
|
3
|
2014-07-05
|
World Cup 2014
|
Quarter-final
|
Belgium
|
Away
|
0
|
A long layout stores one match participant per row; comparing it with the wide layout makes structure and analytical grain explicit. section 3.1.1






















