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

Should I put a non-clustered index on these foreign keys in a fact table

Profile of the foreign keys FK Distinct Values % ---- --------------- ------ Id1 1 0.1% ,Id2 4 0.3% ,Id3 5 0.3% ,Id4 6 0.4% ,Id5 6 …
2
votes
4 answers

Key DataType for a high volume SQL Server 2008?

I in the process of designing a database for high volume data and I was wondering what datatype to use for the primary keys? There will be table partitioning and the database will ultimatley be clustered and will be hot failover to alternative…
littlegeek
2
votes
2 answers

Is there any benefit to including relationships in your star schema table design?

I'm designing the Fact and Dimension tables for a data warehouse currently using SQL Server, SSIS, and SSAS. Will I get any real benefit from programming the relationships between the dimensions and the fact tables into SQL? Or am I better off just…
rrydman
  • 501
  • 3
  • 9
  • 15
2
votes
2 answers

Creating Data Warehouse

I am creating a data warehouse by using a star schema. I successfully build all the dimension tables, but I'm kind of stuck at the fact table. I am in a need to make a Sales table as Fact table. It has SalesKey, OrderKey, ProductKey and etc... Every…
2
votes
3 answers

What are the types of dimension tables in star schema design?

When reading about star schema design I have seen that many people uses various names for different types of dimension tables. Please list the names and a small description of each type. If any list also an alias name.
MOLAP
  • 784
  • 4
  • 13
  • 28
2
votes
1 answer

Star schema modeling - many-to-many

I'm building a data warehouse based on NFL statistics for educational purposes as I learn this paradigm - I have the following modelling problem Players can play for different teams different years and similarly coaches can coach different teams…
2
votes
1 answer

Can a Star Schema Contain Outriggers?

My understanding from Star Schema modelling is that dimensions must directly link to a fact table. If this is true, then a star schema can't contain Outrigger dimension table. So, is this statement true that if a schema contains Outrigger dimension,…
2
votes
1 answer

When do we consider snowflaking a star schema?

In the below dimensional model, all the dimension table follows the star schema except the prod table, which is snowflaked and has prod_sub table as a child table. What is the strategical point to consider snowflaking a star schema? Sales Table -…
2
votes
0 answers

Best practices for fact table that depends on two processes

I am building a star schema for an online business. One of the key processes is email newsletter signup. But the analysis depends on two processes and I can't figure out how to model it the best way. Here's how the process works: Person visits…
2
votes
1 answer

How to handle one to many in a star-schema?

I need a way to associate one or more fractional owners with an aircraft in the following star-schema (see diagram below). Is the following diagram and example of the correct way to model that relationship in a data warehouse? The most common need…
ra9r
  • 4,528
  • 4
  • 42
  • 52
2
votes
1 answer

How to accomplish star schema in Tableau with multiple facts (without records falling off)

I have a fairly simple data model which consists of a star schema of 2 Fact tables and 2 dimension tables: Fact 1 - Revenue Fact 2 - Purchases Dimension 1 - Time Dimension 2 - Product These tables are at different levels of granularity - meaning a…
corycorycory
  • 1,448
  • 2
  • 23
  • 42
2
votes
0 answers

How to join two Fact tables?

I'am new in DWH so I have a problem. We have couple fact tables (5 in fact), in the first table we have Applications (when people want to buy our product they make App), then, after people make App and some checks, that's App go to another database,…
AlexRov
  • 21
  • 1
  • 4
2
votes
0 answers

How to "replace" a SQLite table without overriding indexes and keys?

Currently I push my dataframes into several SQLite tables by using pandas basic functionality df.to_sql('df', if_exists="replace"). My idea is to 'optimize' the table afterwards in "DB Browser for SQLite" by setting primary keys, foreign keys,…
Christian
  • 515
  • 1
  • 6
  • 17
2
votes
2 answers

Full text search with CONTAINS is very slow

We try to use Full text search on Azure database and got performance problems on using CONTAINS search. Our data has star schema, Fact table has clustered column store index enabled and around 40 million rows. Below is how we use CONTAINS on…
cuongle
  • 74,024
  • 28
  • 151
  • 206
2
votes
2 answers

Star Schema Design / best practice

I am working with a system, which has 4 databases: Account (Storing bank accounts, transactions, etc) Client (Client related info) Credit (getting rates from 3rd party system) Quality (Further internal calculation) I want to create 4 facts tables,…
Hooman Bahreini
  • 14,480
  • 11
  • 70
  • 137