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
2 answers

Advice on basic star-schema design (Date dimension)

I have the following dataset ready to load to a data warehouse: CUSTOMER_KEY | PRODUCT_KEY | PRODUCT_DESCRIPTION | DATE | VOLUME | AMOUNT I am confused with the Date dimension. The date format in the dataset is 'YYYY-MM-DD'. I want to create a…
0
votes
1 answer

Count Distinct Values in one column table related to another column table Power BI DAX

I want to visualize in a power bi chart the distinct count values from one column referencing another table column. This should be done using a measure, not a calculated column. So I have a fact table like this…
0
votes
0 answers

Dealing with multiple fact tables concerning related processes in dimensional modeling

I have the following scenario where OLTP sales data is stored in two separate physical tables: Sales Refunds/Cancellations A refund always refers to an existing sale (thus 'negating' it), though the dimensions of these tables are nearly the same…
filpa
  • 3,651
  • 8
  • 52
  • 91
0
votes
0 answers

Many-to-many from relational design to dimensional design

This is my database design: I make a data warehouse a with 2 fact table design as you show : I want to add Order dimension but the problem is that there is bridge table between product table and order table by the way order table contain 830 rows…
0
votes
2 answers

How to represent different business facts in a single fact table?

I have the following dimensional tables: DimUser DimClient DimLocation DimDate DimTime DimLog DimStatuses How could I represent the following events in the fact table? Logs by user over time User status change over time Let's say the fact table…
0
votes
0 answers

Build real-time Data Warehouse using Apache Kafka & Mysql

We have a data warehouse on MySQL with dimensions, fact tables and some aggregate tables. I want to implement the same structure using Apache Kafka where Source would be another MySQL server. I want to address the below requirements Add foreign…
0
votes
1 answer

Star Schema and Weighted Averages/Summarised Data

What is the appropriate way to handle data that is, by virtue of its source, rolled-up or otherwise summarised and weighted ahead of time (min, max, avg for the summarisation)? I cannot change that behaviour, so while "Do not summarise the data" is…
localusername
  • 45
  • 1
  • 5
0
votes
1 answer

Star Schema Design Help

I'm stuck on how I would put together a star schema around my current web application (similar structure as stackoverflow). I have: Surveys have many Questions Questions have many Votes Questions have many Comments Questions, Votes and Comments…
user151419
0
votes
1 answer

Star Schema - Unify data with varying structure from different sources

I am currently designing a star schema for a reporting database where an online product's performance is measured. The challenge is, that I receive information which is in principle measuring the same facts (visits, purchases) and has the same…
0
votes
1 answer

Why is snowflake schema normalized?

Why is the snowflake schema normalized, even though the data warehouse has the property of being denormalized? I am learning about data warehouse technologies, can anyone elaborate on this for me? I apologize if I am missing something here, I am…
Zuffido
  • 104
  • 1
  • 11
0
votes
1 answer

How different fact tables are handled to share some common dimension tables in data marts in star model?

I am quite new to DW and I am just learning the stuff. I read on the Internet that after the ETL process, DW data is then stored in some data marts for some reasons such as ease of use. Each data mart can use a structure. Let's say a data mart is…
0
votes
1 answer

Whether sales (fact) table should be made to have the userid from customer (dim) table in dimensional modeling?

I have following relationships: User (userid, username) Customer (customerid, userid, customername) Sales (salesid, customerid, saledate, saleamt) In the DW I am loading the data as follows: User (userid, username) Customer (customerid, userid,…
0
votes
1 answer

Data Model for different source data structures

Question on Data Modeling I am building a data warehouse on Redshift where I have fact data coming from multiple sources. Source 1 - Has different facts and Dimension tables they are maintained well with integrity etc. Dimension tables have…
0
votes
2 answers

How to model location that is common to 2 dimensions?

I am creating a data model and need guidance. I have 2 dimensions: customer, product And 2 fact tables: sales, purchases. Both the dimensions have Location column. Suppose user selects London then it should show all customer and products from…
variable
  • 8,262
  • 9
  • 95
  • 215
0
votes
3 answers

Star schema - splitting dimensions into multiple smaller dimensions

I have been working in dashboarding for a long time and have always been using the traditional kimball star schema to build my reporting and dashboarding on. The architecture team at work have been working on automating the dimensional star schema.…