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

Star Schema from multiple source tables

I am struggling in figuring out how to create a star schema from multiple source tables. I work at a trading firm so the data is related to user trading activity. The issue I am having is that our datasets do not have primary ids for every field…
0
votes
0 answers

EDW Bus Matrix for Model with Dimensional Bridge Table

I am currently trying to put together an EDW Bus Matrix to summarize an existing data warehouse/data model I have in place, but am not sure of the best way to show a particular relationship. In my data model for a manufacturing business, I have a…
0
votes
0 answers

Star schema modelling

I am new to data warehouse concept and currently modelling a star schema structure for private medical insurance. One insurance policy can have up to 15 people, and each person can have up to 70 different measures such as their combined medical…
0
votes
1 answer

Modelling data for Analysis & reports

I am trying to build a star schema for some engraving data. The egraving data i get along with my orders from my source is in the below format. Ex 1. BK: S2: This ^ May, 2018 ^ is engraved ^ on my ring Ex 2. LFT: S2: Love You ^ SY#LValways…
0
votes
0 answers

FACT table change ( Granularity Change )

I have a fact table with Store Account data on orders. Every Order currently - 1 per line. I have been informed that the FACT table should now only show the Latest Order Number for Reporting. However they want an option to display every order…
James Khan
  • 773
  • 2
  • 18
  • 46
0
votes
2 answers

Violation of Primary Key Constraint - SQL Server

In my SQL Server, I've created a database and I am trying to export the values from the 2 tables listed below into a new table that I created DM_Location within the database. But I keep getting this Error Violation of PRIMARY KEY constraint…
0
votes
1 answer

Do we have to use fact table for reports?

I am working on building a data mart for reporting purpose. I am new to this field and looking for help. I have a fact table and two dimension tables. The fact table has only 3 fields, its primary key and foreign key references to two dimension…
akotian
  • 3,885
  • 1
  • 33
  • 44
0
votes
1 answer

Extracting unique result and reducing cost in star schema in postgres

I have following star schema which has bunch of tables involved as shown below to determine availability of book in a library f_book_availability (This table consist of availability of books with references to other dimension table which i will…
0
votes
0 answers

How to populate dimensions with no matching columns?

I'm working on a project for school and I'm new to the database design so I would appreciate any advice to learn the best practices. I was giving a data source for a bank and my assignment is to create OLTP then DW. My OLTP is as follows now I'm…
0
votes
1 answer

How are fact tables formed in relation to the dimension tables?

I am trying to understand how fact tables are form in relation to the dimension tables. E.g. Sale Fact Table For there is a query for Sale of product by year/month/week/day, do I create a dimension for each type of period: Dim_Year, Dim_Month,…
Jin Yu Chan
  • 19
  • 1
  • 6
0
votes
1 answer

Power BI DAX Functions not Working Because of Star Schema Relationships

I've been trying to create my first star schema based on Google Classroom data for a week. I put a description of the tables from my most recent attempt below. I didn't list descriptive fields not relevant to my question. I have a table visual…
bpnit
  • 3
  • 2
0
votes
3 answers

Different SCD types for different columns

Does it make sense to have different SCD types for different columns at single dimension? Or it's always better to split a dimension table into two tables? For example, the operational systems sends me the following data: ID | CHANNEL_CODE | NAME |…
VB_
  • 45,112
  • 42
  • 145
  • 293
0
votes
2 answers

Sql Server Why call it a Time Dimension?

I have concerning question as to why when preparing Cubes in sql server they have have a time DIMENSION. From my studies on time I have always learnt that time in math is a function. t squared is speed t cubed is velocity. ok a time dimension sounds…
0
votes
0 answers

When to Use a bridge table in a star scheme

I am struggling to know when to use bridge tables while designing star schemas. Is it safe to assume that if the attribute I am looking for is in a many to many relationship entities, then I will have to use a bridge table? For example, if we want…
0
votes
1 answer

How to deal with equally growing fact/dimension tables in datawarehouse design?

I have a source data set with: 1. customer 2. customer_product_purchase 3. customer_support_plan_purchase 4. customer_support_request All of them have a relationship such that a support request is raised against a plan and product purchase.…