Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I've been reading about dimensional models, and in particular fact tables, but I haven't really seen one in action (i.e. the actual content), just diagrams of the table structures and column names

From my reading it sounds like you only put the primary (i.e. primary auto incremented) keys from the dimension tables into the fact table, and not any of the actual dimensional information in the table

Is this accurate? The example I have in my mind looks like this:

+---------+------------+-------------------+
| date_fk | product_fk | units_sold (fact) |
+---------+------------+-------------------+
|  3      | 12         |  1154             |
|  3      | 50         |  484              |
+---------+------------+-------------------+

Where date_fk is the primary auto incremented key for the dimDate dimension table, product_fk is the primary auto incremented key for the dimProduct table, and units_sold is the actual fact, the number of units sold that day for that product

Please confirm that this is the correct method; my dimension tables also uses numeric natural keys so it's tempting to use those instead of the adjacent primary keys to avoid having to do JOINs for every query, however I am committed to using dimensional modelling so I need to do it right

share|improve this question
1  
Thanks, "entirely" wasn't the right word. I guess I meant the most commonly used dimensional attributes, since they could also double as keys themselves for grabbing other attributes as needed, this is why I needed clarification since as I stated my natural keys are numerical as well, but not necessarily unique which I suppose makes all the difference –  Drewdavid Oct 29 '13 at 16:10
add comment

1 Answer 1

up vote 0 down vote accepted

Yes, that is the correct method.

share|improve this answer
    
Ok thank you :) –  Drewdavid Oct 29 '13 at 16:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.