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

Setting up Time Dimensions for Resolutions in a Star-Schema

I've been doing some reading on architecture types for OLAP processing, specifically the Star Schema concept. I'm currently setting up a database for testing. My Situation I have 750 sensors, each will be posting data to an SQL database every…
Ajility
  • 526
  • 3
  • 19
3
votes
0 answers

Is it recommended to process a fact table as SCD type 2?

Background We are a courier company specialized in same-day-delivery for webshops. Customers can choose for same-day-delivery when ordering at a webshop, the webshop registers those packages in our system and at a certain cut-off time, we pick up…
3
votes
1 answer

How to populate fact table with Surrogate keys from dimensions

Could you please help understand how to populate fact table with Surrogate keys from dimensions. I have the following fact table and dimensions: ClaimFacts ContractDim_SK ClaimDim_SK AccountingDim_SK ClaimNbr ClaimAmount ContractDim ContractDim_SK…
Rachel
  • 208
  • 1
  • 5
  • 18
3
votes
3 answers

What if your fact has multiple instances of the dimension?

In a star schema for a clothes shop, there is a transaction fact to capture everything bought. This will usually have the usual date, time, amount dimensions but it will also have a person to indicate who bought it. In certain cases you can have…
More Than Five
  • 9,959
  • 21
  • 77
  • 127
3
votes
1 answer

Star Schema Fact Should not store price - Why?

I cam across this sentence: We always strive to make the facts additive across the dimensions and exactly consistent with the grain. Notice that we don’t store the price of the product being scanned because the price is nonadditive. Rather,…
NoChance
  • 5,632
  • 4
  • 31
  • 45
3
votes
2 answers

dimension attribute repeated in fact table restricts filtering/display in reporting

Scenerio: Fact Table: Fact_Travel_Plan Dimension Table: Dim_City I have created relationship with Dim_city and Travel Plan as Dim_City.CityId --> Fact_Travel_Plan.EntryCityId Dim_City.CityId --> Fact_Travel_Plan.ExitCityId While establishing the…
3
votes
2 answers

Late arriving fact - best way to deal with it

I have a star schema that tracks Roles in a company, e.g. what dept the role is under, the employee assigned to the role, when they started, when/if they finished up and left. I have two time dimensions, StartedDate & EndDate. While a role is…
JD_Sudz
  • 194
  • 1
  • 12
3
votes
2 answers

Is there a google supported JDBC driver for BigQuery?

We are looking to access BigQuery through third party sql clients, ex. RazorSql. I came across StarSchema JDBC driver and I could not make it work with Razorsql and on the webpage it says that the project was archived. So, not sure if its supposed…
FZF
  • 855
  • 4
  • 12
  • 29
3
votes
1 answer

how to put data in fact table?

i'm new in business intelligence and i design a star schema that implement a data mart to help analyst to take a decision about student grades dimensions tables : - module (module code, module name) that contains information about the module -…
Mohammed Amnay
  • 73
  • 1
  • 1
  • 5
3
votes
4 answers

How do I avoid complex joins in star schema?

My fact table holds a user score in a course he took. Some of the details of the course, which I have to show on the report, comes from more then one table (in the actual OLTP db). Do I create a none normalized version of that course entry in a…
Itay Moav -Malimovka
  • 52,579
  • 61
  • 190
  • 278
3
votes
1 answer

Dimensional Modeling - Common Attribute Used In Various Dimensions Compositie Keys

I have a situation here that I have not faced before. I have multiple instances of the same ERP system, differing by satellite locale. Each locale is assigned their own ID. Within each satellite location, the DB schema is the same as the others,…
3
votes
1 answer

Schema for analytics table in Postgres

We use Postgres for analytics (star schema). Every few seconds we get reports on ~500 metrics types. The simplest schema would be: timestamp metric_type value 78930890 FOO 80.9 78930890 ZOO 20 Our DBA…
3
votes
3 answers

Is this a MySQL JOIN?

SELECT dim_date.date, dim_locations.city, fact_numbers.metric FROM dim_date, fact_numbers WHERE dim_date.id = fact_numbers.fk_dim_date_id AND dim_locations.city = "Toronto" AND dim_date.date = 2010-04-13; Since I'm not…
Drewdavid
  • 3,071
  • 7
  • 29
  • 53
3
votes
3 answers

Attributes of my Time dimension table in star schema

I'm building a DW with a star schema modeling. I'll use it for a BI project with pentaho. I'll have of course a time dimension table. I'll analyze my fact table with differents granularity (day, week, month year, perhaps other) Should I put one…
joris
  • 435
  • 1
  • 7
  • 18
3
votes
2 answers

Data Warehouse: Working with accumulated data

Our data warehouse uses accumulated data (and there is no way to invert the accumulation) from a data source to create a snowflake schema. A requirement we have to cope with is that our schema must be usable to create reports based on date…
1 2
3
23 24