Model - Design a data model Flashcards
(133 cards)
What is a data model?
A way to organise tables from data/information systems in a way which makes it easier for people to understand your data
Benefits of a good data model?
Data exploration is faster
Aggregations are simpler to build
Power BI Reports
Reports are more accurate
Writing reports takes less time
Reports are easier to maintain in the future
Explain how data models make data easier to understand?
One table with 30 columns would be harder to work with compared to those 30 columns being logically decomposed into 5 data tables. Alternatively, 30 tables with limited columns would be better illustrated in 5 tables.
What is best practice for data models?
Aim for simplicity: make the data model as intuitive as possible for the user (e.g., could a lay person understand?)
Make the data model as small as possible (i.e., fewer tables and fewer columns)
What are relationships in a data model?
Relationships are defined between tables through Primary and Foreign keys.
Primary key = columns that identify unique values
Foreign keys = reference rows or primary keys in another table
What is Power BI’s data modelling capability?
You can pull data from different data sources, create relationships between those tables and treat it as a unified dataset
What are the data schema components?
Tables: contain fields and values
Relationships between tables: primary keys and foreign keys
What is a database schema?
A database schema defines how data is organized within a relational database
What is a star schema?
A specific type of schema design that is optimized for high performance and usability.
Components of a star schema?
Tables are conceptually classified into two types:
Fact table
- Dimension table
Difference between measures and dimensions?
Dimensions contain qualitative values (such as names, dates, or geographical data). You can use dimensions to categorize, segment, and reveal the details in your data. Dimensions affect the level of detail in the view.
What are the differences between fact and dimension tables?
Fact table
- Observational/event data
- Contains measures and numbers
- Distinct values in multiple rows
Dimension table
- Contains details about the fact table
- Unique values appear in one row
What is the relationship between fact and dimension tables?
Fact tables are filtered by dimension tables
Example: Total sales can be filtered by the products
What makes a simple table structure?
Simple to navigate and user friendly = logical column and table properties
Have merged or appended tables to simplify the tables within your data structure.
Have good-quality relationships between tables that make sense.
How to configure data model and build relationships between tables?
Manage relationships
Configure relationships between tables
Explain the autodetect feature?
When you load you Queries into Power BI it will automatically establish relationships between columns based on column name.
When you load data, Power BI automatically looks for relationships that exist within the data by matching column names.
How to configure table and column properties?
Manage properties
Shortcut: Ctrl+clicking or Shift+clicking items on this page.
What are the main sections within the table properties pane?
General tab
Formatting tab
Advanced tab
How to configure many tables and fields at once?
Select many fields to configure at once: Power BI has a new functionality to update these properties on many tables and fields by Ctrl+clicking or Shift+clicking items.
Why is creating date tables useful?
Common business requirement to make calculations based on data and time
Businesses want to know how their business are doing over months, quarters and fiscal years etc
It is crucial to format time-oriented values correctly to enable time-based calculations
Some businesses might prefer date/time in particular format
Challenges with autodetect on date tables?
Power BI autodetects for data columns and tables however sometimes you will need to take extra steps to format the dates as the organisation requires
Why create a common date table?
Some tables have their own dates fields so you will need to create a common date table to enable interaction between the tables à need to build a common date table
What is the best practice around date tables?
Use a source date table because it is likely logically structured and shared with other applications
Source databases and data warehouses have their own date tables. These date tables can be used to perform tasks such as:
Identify company holidays
Separate calendar and fiscal year
Identify weekends versus weekdays
What are the 3 ways to create a common date table?
Source data
DAX
Power Query