Questions tagged [star-schema]

Star schema is the most basic data warehousing dimensional structure and database schema, consisting of one or more fact tables referencing any number of dimension tables.

Star schema is the most basic data warehousing (data mart) dimensional structure and database schema, consisting of one or more fact tables referencing any number of dimension tables. It is organized like:

  • Facts - event that is counted or measured. They can be at a very atomic level. Generally assigned a surogate key to ensure every row can be identified.
  • Dimensions - reference information about facts. The records contain detailed information and attributes describing the fact data. Usually assigned a surrogate primary key.

Within the data warehouse and data mart the dimension table is associated with fact tables using foreign key relationship.

Advantages

In well-designed schemas multidimensional data can be analyzed easily. They are good in decision-support environments. Some of the advantages are query speed, data load and administration. The built-in referential integrity is good but not as in highly normalized databases though.

Examples

An example star schema could have a Sales Fact with Date, Product, and Store Dimensions. Any numerical performance measurements related to Sales would also be stored in the fact, like "Quantity Sold" and "Dollar Amount of Sale". The remaining columns in the Sales Fact would be foreign keys linking to the Dimensions.

More information

354 questions
0
votes
0 answers

Implementing date dimensions in DW?

Working on my first data warehouse project and learning online on the way using tutorials, articles, youtube videos etc. I'm using data meant to mimic an OLTP database for a dvd rental company, and I'm at the stage of implementing my dimension and…
0
votes
0 answers

BI Model for Alert analysis

I have an alert table which contain alerts received by iot devices every day. A Device can be related to one or many PAPE. I have an association table between devices and PAPE (the association table is historized with startDate and endDate) I have…
SniperPro
  • 75
  • 1
  • 10
0
votes
2 answers

How to handle repeating values in fact table due to few numeric columns being at a higher grain?

I am looking at a fact table which has a certain grain. So each record represents a transaction at that grain. Let's say the grain is header detail sub-detail. But there are some numeric columns in this table that have values of a higher grain. That…
variable
  • 8,262
  • 9
  • 95
  • 215
0
votes
0 answers

Why does my Fact Table show NULL for all Foreign Key values, instead of the corresponding Dimension Table Values?

I'm trying to build a Star Schema in MySQL. I have the raw data, and I've uild the Dimension Tales and Fact Table. But it looks like my Fact Table is linking correctly to the Dimension Table, because all the Foreign Key values are NULL. How do I…
0
votes
0 answers

how to develop stat schema in azure synapse spark?

I have one table wihich is very big in size and column wise too (100 columns). I have 10 columns of which inside one column there are 100 nessted columns. I explode this 100 columns and then i try to count no of rows by groupby function which makes…
0
votes
0 answers

How to resolve 1-n relationship between in star schema?

I'm working on a data storage model for a clickstream analytics system. User action data comes from a third-party system as a set of large JSON files. Currently, we will have an ETL process to read JSON files as a source and save data into our store…
Oleksii
  • 294
  • 1
  • 5
  • 12
0
votes
1 answer

How to create relationships with many fact tables in Power BI?

How do I create a relationship between these 4 fact tables and 2 dim tables? How do I slice them based on quarter of the year? How to insert Q1 2023 into the fact tables? When I change from Q1 to Q2 on the slicer, the count of MemberID doesn't…
0
votes
1 answer

How to deal with reporting slowly changing dimensions

For a client I am creating a data warehouse in which we have some slowly changing dimensions (or facts if that is even a thing?). For example we want to report the annually recurring revenue (ARR) for subscriptions and we want to have both the…
0
votes
1 answer

Calculation based on 2 fact tables (plan/actual comparison)

I have to link TWO tables (Planning vs Executed) that have: date, shift, SKU and Quantity to calculate the match between planned and executed (in %). In other words, I need to create a comparison of two tables using 3 fields as reference (Date,…
0
votes
1 answer

Is this the correct way to have multiple fact table?

Currently, i am in the process of designing a schema for storing product information which in the end will be used for analyzing the price changes, availability of the product itself. The granularity of the analysis can varied, whether its on item…
0
votes
2 answers

How should I model a business process and its subsequent related processes and actions?

I feel it is similar to the age old Sales --> Orders setup but I can't seem to finalize a solution. I have a Business process of "Complaints" which are placed into a fact table which are in a traditional star schema linking to other dimensions such…
0
votes
1 answer

Data warehouse modling - to use ID or text in a dimensional table

I always doubted if I should include ID or the actual text in the dimensions. For example, see DimSalesPerson in the screenchot below -…
0
votes
0 answers

Star Schema with Delta Tables: No referential integrity?

In a typical star schema we have fact tables and dimension tables. Reading that article it seems like databricks suggests to use delta tables for realizing the star schema. However, delta tables do not support referential integrity - see here and…
user3579222
  • 1,103
  • 11
  • 28
0
votes
0 answers

Star schema modelling - joining fact tables

I have a couple of modelling questions using several star schemas. There are different entities which I consider facts (they all share similar dimensions, dimcustomer, dimdate, dimshop, etc.), for example, orders, payments, inventory, credit cards…
Maria
  • 363
  • 4
  • 13
0
votes
1 answer

Can observations in a fact table also be dimensions?

My understanding is that a fact table uses keys, which are dimensions that ought to have their own dimension table, to identify observations and assign them values. Can these values themselves be dimensions? Or does that violate some principle of a…
J. Mini
  • 1,868
  • 1
  • 9
  • 38