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

How to decide on a data warehouse schema for clinical dataset?

I am trying to design a schema for the a clinical dataset, MIMIC-III. I am trying to figure out a way to store the events in a way such that users can query the dataset with ease using possibly a star schema. Almost all of the entries such as…
0
votes
0 answers

Database Design Approach to include new Table in existing Relationship

I'm using star schema approach in my application. This approach is working fine if I have defined set of Tables (Dimensions). Here, in this example I have defined set of tables like Customer Dimension Product Dimension Time Dimension Staff…
55SK55
  • 621
  • 2
  • 8
  • 23
0
votes
0 answers

Query dimension in Star Schema

During report creation, I've included data from only dimensions (no measures), and records from them are cross joined. Can you query only dimensions from the Star Schema in a report? For example in the following simple SSAS cube, can I query Subject…
Nancy Drew
  • 31
  • 2
0
votes
1 answer

Star schema many-to-many for time series data

I have a DataWarehouse / star schema modelling question. I have meter readings (facts) for different locations (dimensions). Each location has multiple organisations in different roles. I would like to model this in a data-warehouse schema. …
Paul Grimshaw
  • 19,894
  • 6
  • 40
  • 59
0
votes
1 answer

SCD 1 dimension without surrogate key

This reference to Kimball group state that all dimensions should have surrogate keys except some very predictable one like date diemnsion. I have exactly the same case as described at SCD Type 1 Wiki page: Technically, the surrogate key is not…
VB_
  • 45,112
  • 42
  • 145
  • 293
0
votes
1 answer

How do I make a simple day dimension table for data warehousing star schema with postgresql?

How would I go about creating and populating a simple DAY dimension table for a star schema in postgreSQL ? It is for an intro course to data warehousing and so it only has a few fields but most of the examples online are very involved and seem…
backslash
  • 304
  • 4
  • 9
0
votes
0 answers

How do you recognize which source the enteries in a dimension table come from? - Data Warehouse

I have 3 university source databases from which I'm loading the data into my data warehouse dimension tables. Since all 3 sources will be in the same dimension tables, how do I know which rows are from which university? For example; if I wanted to…
0
votes
2 answers

Is this an appropriate way of populating dimension table with unique values?

Would the following script be appropriate for populating the date_dim table? I'm using sqlalchemy to populate a temporary table in MySQL with a PANDAS DataFrame. The purpose for the SQL script below is to populate dates_dim with the values of…
LeoGER
  • 355
  • 1
  • 8
0
votes
1 answer

Generic vs Conformed dimensions

I'm new to dimensional modeling. I'm reading Kimball's "The Data Warehouse Toolkit". As soon as I understood, Conformed Dimensions are a good thing, a key concept for integration of different fact tables. Usually you will have a separate fact table…
VB_
  • 45,112
  • 42
  • 145
  • 293
0
votes
1 answer

User defined calendar table in power bi

I am trying to add calendar table in power bi .. here how i add Calender = ADDCOLUMNS(CALENDAR (DATE(1995,5,1), DATE(2019,12,31)), "Year",FORMAT([Date],"YYYY"),"Quarter","Q"…
0
votes
1 answer

How is data in dimensional tables and fact tables of a data warehouse star schema?

I am studying data warehousing star schema and attribute hierarchies and I am getting confused because the examples of the book do not provide sample data on which to confirm my understanding of things. In the book there is a sales data warehouse…
prince
  • 671
  • 2
  • 11
  • 26
0
votes
0 answers

Do we use 3NF to build Data Marts in Kimball's Data Warehouse Approach?

enter image description here I was looking at some images which explains Ralph Kimball architecture and some of them shows data marts are in 3NF. But some articles shows star schema(denormalized) is used in Kimball's approach. Which one is true?
0
votes
1 answer

Querying Dimensional Model or schema using Java and SQL

I have a star schema with information/data and I want to write the sql query to pull data from the star schema and then embedd that sql in java application. where can I start from? or are there tutorials that can help me to write java application…
Chiko
  • 1
  • 1
  • 3
0
votes
1 answer

Single vs. multiple ID columns in data warehouse/lake

I have setup a time-series / events database using the AWS Firehose -> S3/Glue -> Athena stack. It is being used to track various user actions - session started, action performed etc. across a number of our products. My question is about how best to…
routeburn
  • 1,156
  • 1
  • 12
  • 27
0
votes
1 answer

Can I work with Many Fact Tables? My DW has many fact tables, to diferent products

Can I work with many fact tables? In my model I have many fact tables cause I have multiple diferent products in my company. But the model in analysis services became big, today we have 60 tables in analysis services model. Is there any…