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 aggregation issue

I have two dimension tables and one fact table as following: drop table if exists ref; create table ref (country_id int not null, id_ref int not null); insert into ref values(1,1); insert into ref values(1,2); drop table if exists conv; create…
Developer
  • 817
  • 2
  • 16
  • 28
0
votes
0 answers

star schema database in sql server

I create a test1 database in sql server 2008 r2 and then another test 2 db .. tables product_info table Product_id product_name unitprice unitsonorder user_info table user_id user_name user_pwd email city product_id and in test 2 db i create star…
0
votes
1 answer

string as primary key in star schema

We are creating a Data Mart consisting of around 8 Star Schemas, each representing a business event, process or reporting set of data. We have an equal mix of Transaction, Snapshot and Accumulating Snapshot schemas. The value we are intending to use…
john
  • 145
  • 1
  • 4
0
votes
4 answers

How to import data into star schema data warehouse.

I have searched everywhere on the web to find out how I can import data into a star schema data warehouse. A lot of the stuff online explain the design of the star schema and data warehouse but none explain how exactly data is loaded into the DW.…
0
votes
0 answers

Star Schema database for NBA/Basketball statistics

I want to design a database of basketball players and their stats. I hear star schema databases are the best for these type of tasks. If I'm not mistaken, star schema has dim and fact tables. I plan to load scores/stats into the fact tables and…
0
votes
2 answers

Customer Dimension as Fact Table in Star Schema

Can Dimension Table became a fact table as well? For instance, I have a Customer dimension table with standard attributes such as name, gender, etc. I need to know how many customers were created today, last month, last year etc. using SSAS. I…
0
votes
0 answers

Virtualizing star schema

Does anyone have experinces about virtualizing star schema model? i.e. making database views which contain the data for facts and dimensions, instead of having them in physical tables.
Juha S
  • 25
  • 1
  • 7
0
votes
2 answers

Can a Accumulating snapshot table has multiple dates in it?

I am trying to make sense of dimension modeling. While reading a dimension modeling book, I have created a star schema. The fact table is a Accumulating snapshot table and it has multiple date columns which are linked to a date dimension using a…
user18620
  • 120
  • 2
  • 10
0
votes
1 answer

Best SQL indexing plan for wide table

Hello SQL Gurus out there... I have this month long problem that I can't seem to solve. I have this really wide (Reporting) table approx. 100+ fields. Right now, it has around 2M records and with the rate the data is coming, it will probably double…
0
votes
2 answers

Data Warehouse - MDX query to calculate top 5 universities

I am trying to create a star schema to analyze rankings on universities. I created star schema which is at the below; fact table; Ranking University_id Time_id Classification_id ranking(measure) the dimensions and…
yns
  • 440
  • 2
  • 8
  • 28
0
votes
2 answers

dimensional data modelling design - Data warehouse

I am having dimension tables item (item_id,name,category) Store(store_id,location,region,city) Date(date_id,day,month,quarter) customer(customer_id,name,address,member_card) fact tables…
Praveen
  • 77
  • 7
0
votes
1 answer

Implementing Date Range in OLAP systems

Please bear with me if this is a trivial question,I am a new bee I am in the design phase of a OLAP system where i need to show cost for a date range. I have three other dimension like product,vendor and language. Should I add date as one more…
Crypt
  • 189
  • 1
  • 4
  • 13
0
votes
1 answer

When Designing a BI Start Schema, Should Dimension Tables Use Only User-Friendly Attribute Values?

I am designing the Dimension tables for my BI Start schema. I have already observed the value of user-friendly attribute values associated with each Dimension value, as these can be used quite readily and effectively in reporting. I would like to…
qxotk
  • 2,384
  • 5
  • 24
  • 39
0
votes
2 answers

Designing fact table to allow simple most-recent detection of classes of facts

I'm working on a data warehouse fact table design for a contact history fact table. My current schema looks something like this: [FK] DateKey INT [FK] TimeKey INT [NK] CustomerNK INT [NK] CustomerPhoneNK INT [FK] ContactTypeKey INT [FK]…
Corey
  • 15,524
  • 2
  • 35
  • 68
0
votes
1 answer

schema designing in data warehousing and mining

I am bit confused between fact and dimension tables and I am not able to clear my doubt . Thing is I have to design a schema where there is one keyword table . And corresponding to each and every keyword we have a date table and site table(that…
DEVANG PANDEY
  • 157
  • 2
  • 15