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

Modelling Feature Flag Data in a Star Schema

I have a data set that includes some information about the status of product feature flags for a given account. It looks approximately like this +-----------+------------------------------------------------------------------------------------+ | …
Nickat
  • 11
  • 1
1
vote
0 answers

How to Improve this Star Schema Design

I'm taking a course on Business Intelligence and I have to deal with a Star Schema for the first time in about 3 years so I wanted your feedback on what I've done if possible and see if there is anything I can do to improve my current design. So…
1
vote
1 answer

What are the advantages/disadvantages of having all Foreign Keys in the Fact Table?

Our team is planning to add missing dimension keys (FK's) to our fact tables to allow for direct querying between our dimensions and fact tables rather than going through tables. Essentially, leaning more towards a star schema. This will improve…
Shoaib Maroof
  • 369
  • 1
  • 3
  • 13
1
vote
1 answer

Implementing temporal tables for dimensions for tracking changes

I am working on a star schema and I want to track the history of data for some dimensions and specifically for some columns. Is it possible to work with temporal tables as an other alternative ? If yes, how to store the current record in a temporal…
Amira Bedhiafi
  • 8,088
  • 6
  • 24
  • 60
1
vote
1 answer

Time span accumulating fact tables design

I need to design a star schema to process order processing. The progress of an order look like this: Customer C place an order on item I with quantity 100 Factory F1 take the order partially with quantity 30 Factory F2 take the order partially with…
Phạm Văn Thông
  • 743
  • 2
  • 7
  • 21
1
vote
3 answers

Data Warehouse - Versioning of data

I am currently designing a data warehouse for a financial company. While a large amount of the process is quite standard I have been presented with an issue (That I believe only exists in the finance sector) of data events that effect a number of…
Caz1224
  • 1,539
  • 1
  • 14
  • 37
1
vote
1 answer

Primary key is also a foreign key in a star schema. Good or bad?

I am creating a database following star schema. This is my schema: The question is: is it good or bad practice that my side tables don't have an ID column but uses the same column ApsilankymoID as PK, and FK? Relationship with 1Apsilankymas and…
Deivydas Voroneckis
  • 1,973
  • 3
  • 19
  • 40
1
vote
0 answers

Data warehouse - multiple choice survey

I want to use a data warehouse to store questions and answers from a survey of multiple choice questions, so my proposal is to design a star schema. For this I have done the following: I build a fact table with the next fields: userID, surveyID,…
dPrieto
  • 11
  • 2
1
vote
2 answers

OLAP or OLTP for Star Schema?

For Reporting/data warehouse purposes we plan to populate data in star schema. All our current data resides in Redshift, Since star schema follows traditional relationships between tables. should I opt for an RDBMS or building star schema on…
1
vote
1 answer

ETL triple reference timeKey, subquery returned more than 1 value

I am writing an ETL and I am trying to make my dimension reference the time dimension three times. But I can't even get the first one right. The error says: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=,…
1
vote
0 answers

Star Schema or snowflake for derived fields.

We have a fact table that links to a customer dimension using the customer id field. It's working fine and the product owner is happy with it too. As part of the customer attributes we have the [SIC Code 2007][1] [1]:…
1
vote
1 answer

Does a data warehouse need to satisfy 2NF or another normal form?

I'm investigating data warehouses. And I have an issue about star schemas. It's in Oracle® OLAP Application Developer's Guide 10g Release 1 (10.1) 3.2.1 Dimension Table:…
Jame H
  • 1,324
  • 4
  • 15
  • 26
1
vote
2 answers

SQL Server join or Pentaho Spoon lookup?

What provides higher performance? Writing a query using T-SQL, joining tables, then inserting the result into another table Using Pentaho Spoon's table insert, then using database lookup to "join" each table at a time, then inserting the result…
Hikari
  • 3,797
  • 12
  • 47
  • 77
1
vote
1 answer

SSIS - Incremental Load - Lookup Object

I am building a SSIS project in order to create an ETL to load a Data Warehouse that uses a star schema model. I've 3 dimensions: - Customer (Customer_ID, Customer_Name, Email) - Employees (Employee_ID, Employee_Name, Salary) - Product…
John_Rodgers
  • 181
  • 1
  • 11
1
vote
0 answers

SSIS - Load data from Staging Area into Dimension having a Identity Column

I've the following table created: CREATE TABLE [dbo].[DIM_PRODUCT]( [product_id] [int] IDENTITY(1,1) NOT NULL, [product_name] [varchar](60) NOT NULL, CONSTRAINT [PK_DIM_PRODUCT] PRIMARY KEY CLUSTERED ( [product_id] ASC )WITH (PAD_INDEX…
Pedro Alves
  • 1,004
  • 1
  • 21
  • 47