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

Converting a existing db schema to star schema

I am trying to use BI tools to do data analysis on a db that was not designed according to star schema model that the tools expect. Is there a way to convert existing db or atleast part of it say a few tables to star schema model?
learningtocode
  • 755
  • 2
  • 13
  • 27
0
votes
2 answers

What is the disadvantages of star schema?

What is the cons of using the star schema in database design for big data? Is the large size of fact table is a problem? Or we can consider that the disk space is cheap and and large size of the fact table is not a problem at all?
Michael harris
  • 966
  • 2
  • 14
  • 25
0
votes
2 answers

Should I flatten multiple customer into one row of dimension or using a bridge table

I'm new to datawarehousing and I have a star schema with a contract fact table. It holds basic contract information like Start date, end date, amount ...etc. I have to link theses facts to a customer dimension. there's a maximum of 4 customers per…
Arno 2501
  • 8,921
  • 8
  • 37
  • 55
0
votes
1 answer

What would you call a fact table with effective from date and to date?

A slightly silly question in some ways as this is just about terminology. If I have a fact table that records facts that change overtime with respect to the dimensions the fact belongs to, what would such a fact table be called? In fact is there a…
0
votes
1 answer

sum and distinct-count measures (star schema design koan)

I am quite a beginner in Data Warehouse Design. I have red some theory, but recently met a practical problem with a design of a OLAP cube. I use star schema. Lets say I have 2 dimension tables and 1 fact table: Dimension…
elkarel
  • 723
  • 2
  • 7
  • 20
-1
votes
2 answers

Surrogate keys in star schema hierarchy dimension

Is it necessary to have surrogate keys for each hierarchy level above the lowest level in a dimension table? Row City_Key City_Name State 1 1234 Chicago Illinois 2 3245 Dallas Texas 3 4563 Huston Texas 4 …
-1
votes
2 answers

How measure attributes values are populated in fact table?

I am new to Data modelling and trying to understand the practical scenario of using star schema model for the business intelligence below is the example image of star schema model- for a sales table. i understood dimension table and how it is…
Adhi cloud
  • 39
  • 6
-1
votes
1 answer

How to auto-increment in posgresql?

i have a star schema datawarehouse i did the load with python and i set the id of the employee = id in the database , ron has id number = 99 , Tom =201 ,Alice =87 but in the database i found the id where set by default . should i add another column…
Smordy
  • 146
  • 7
-1
votes
1 answer

One or multiple fact tables for different businesses in one company?

I'm new to database design. I'm trying to design a data model for car sharing company. They have more than one business model like car sharing, scooter sharing, delivery. Here is my dilemma, which choice should I choose: (database warehouse bus…
-1
votes
1 answer

what is the best way to join records of multiple dimension tables that are all connected by a common fact table

So I have a fact table that connects multiple dimension tables. Say for dimension tables I have customer, product, and date. Customer has id, name Product has id, price Date has id, year Fact table has cus_id, pro_id, and date_id. All ids are…
Andy
  • 127
  • 2
  • 9
-1
votes
2 answers

The right way to model multiple FACTs schema

Background I'm in a process of designing a database (using a STAR schema). There are three tables to model: products, tests, states. The database will be used to store results of tests conducted on products (in a great simplification). There can be…
-1
votes
1 answer

Populating Table with Values from other table if ID not in DWH table

I am performing an ETL task where I am querying tables in a Data Warehouse to see if it contains IDs in a DataFrame (df) which was created by joining tables from the operational database. The DataFrame only has ID columns from each joined table in…
LeoGER
  • 355
  • 1
  • 8
-1
votes
1 answer

Creating Relationships while avoiding ambiguities

I have a flat table like this, R# Cat SWN CWN CompBy ReqBy Department 1 A 1 1 Team A Team B Department 1 2 A 1 3 Team A Team B Department 1 3 B 1 3 Team A Team B Department 1 4 B 2 3 Team A Team C …
-1
votes
1 answer

Dimensional Model: Appointments-Fact or Dimension

When designing a dimensional model for analyzing the scheduling process in a clinic, is a appointment the grain In the fact table? If an appointment is the grain, how does one calculate the appointment attributes like the overbooked attribute?
-1
votes
1 answer

How to create Star Schema Benchmark (SSB) in SQL Server

I've tried to create a Star Schema Benchmark (SSB) in SQL Server with its data. I downloaded HammerDB and DBGen.exe to create it. But these tools are just for creating TPC-H Benchmarks. I created an SSB schema in SQL Server manually. How can I…
teardrop
  • 545
  • 3
  • 9
  • 18
1 2 3
23
24