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
1
vote
1 answer

Mapping a Star Schema with Spring Boot JPA

I'm struggling to identify the right annotations to use to map a star schema with Spring Boot JPA. Let's consider 3 tables: DIM_One (1)--------(1..n) FACT (1..n) ------------ (1) DIM_Two DIM_One and DIM_Two both have an id that is their primary…
Jonath P
  • 519
  • 5
  • 16
1
vote
0 answers

Rails active_reporting OLAP gem

I'm currently learning about data warehousing for university and my work and want to build a small data warehouse for a project myself. Now I found the active_reporting gem and trying to understand this gem's usage. I made myself familiar with star…
Max Kirsch
  • 441
  • 5
  • 24
1
vote
1 answer

Am I implementing SCD type 1 & 7 correctly

SCD type 1 Suppose I've built SCD type 1 over the following data that comes from operational system: ID | CHANNEL_CODE | NAME | TYPE 1 | A | X | 0 2 | B | Y | 1 Because, Surrogate Keys are preferable even for SCD…
VB_
  • 45,112
  • 42
  • 145
  • 293
1
vote
1 answer

Creating Star Schema (Dimensions and Fact Table) in Hadoop Hive from a single csv file

Im completely new to Datawarehouse, OLAP and hive. I do have a single csv file containing training data about a online market like ebay (see Column Data). My task is to create a star schema in hive (via Data Analytics Studio, Spark, or whatever). I…
1
vote
1 answer

Star Schema with multiple report-group-specific aggregations: good or bad

Objective We're building Enterprise DWH for business self-service: tens of TBs of data and about 30 business users. The flow looks like: Sources -> ETL -> DWH -> Power BI -> User. Transaction grain facts may contain billions of rows, non-additive…
VB_
  • 45,112
  • 42
  • 145
  • 293
1
vote
0 answers

Insert row from a transactional database into a star schema through stored procedure

I need to transform data from transactional database into a star schema. I already created all dimension tables and one fact table (cinjenica) as shown on ERD picture here: left(star-schema) right(transactional database table) I also created Unique…
Tomislav
  • 11
  • 2
1
vote
1 answer

Type 2 Slowly Changing Dimensions and Querying for Historical data at a point in time

I have a small star schema representing time entries for issues in Jira. I have an IssueAttributes type 2 dimension table, and then a TimeEntry fact table. Simplified view of dimension…
1
vote
1 answer

Data warehouse updating data

I am currently designing a star schema based warehouse and have some questions on techniques to process future and past data. Some events in the source system can also be for the future. For e.g., an employee is applying for leave for future. The…
rakesh
  • 338
  • 1
  • 9
1
vote
1 answer

Star Schema horizontal scaling

AFAIK, in case of Relational Database on MPP hardware, the key to performance is a correct data distribution. While Dimensional Modeling is about query flexibility, you don't even know how the data will be queried (shuffled) in future. For example,…
VB_
  • 45,112
  • 42
  • 145
  • 293
1
vote
1 answer

Fact table updatable/deletable rows

AFAIK, the best practices say that you should never updated fact table rows, at least for transaction and periodic snapshot grains. While reading about Fact Table Surrogate Key, found a notion of updates: Certain ETL techniques for updating fact…
VB_
  • 45,112
  • 42
  • 145
  • 293
1
vote
0 answers

northwind database star schema

I am trying to create northwind database star schema.. this is what i create please let me know is this correct or not and one more thing is that i want to create primary key icon .. like in suppliers table suppliers id is primary key so i create…
1
vote
2 answers

Power BI why circular dependency is detected

Can you please explain why I run into this alert message of circular dependency when I try to create relationship between dimension #product (or #region) and a #bridge table which is a Cartesian of product x region? I have connected #bridge with…
Przemyslaw Remin
  • 6,276
  • 25
  • 113
  • 191
1
vote
1 answer

How to get the precise surrogate key for the incomming fact records

I am building a data warehouse for my company. Recently, I just realized that there are some holes (potentially very dangerous) in my SCD type 2 dimension implementation, so that I have to review it over. The current "fromdate" of a SCD type 2…
Pblade
  • 133
  • 1
  • 9
1
vote
1 answer

Can a Conformed dimension also be a slowly changing dimension?

I would like take customer table as an example where it can be a conformed dimension in most cases. I wonder if it can also be considered as slowly changing dimension. If I take a record where a customer changes his phone number(just for the purpose…
1
vote
1 answer

How to model a dimension table that link to several facts with different level of grain?

I have a fact that store client's address. Problem is, the client can choose to insert information at state level, or county level, or street level. In the operation database, there is 1 table for streets, link to another table for counties, link to…