Forum Discussion

katybr's avatar
katybr
Frequent Visitor
4 years ago
Solved

Data model

Hello! 

 

I have a question to know which is the best practice. 

I have a project where I have 4 tables:

-Program (IdProgram,Name,Responsable...)
-Parts of the program (IdProgram,IdSection,SectionName...)

-Parts (IdSection,IdParts,Description...)

-Conformities(IdParts,IdConformities,Answer..)

 

I can work with all those 4 tables related in the data model, each table have one columns that can be related with another table.

 

My question is, is it best to work with the 4 table separately or merge all the 4 tables into one?

 

Thank you 🙂

  • Best practices suggest creating dimension tables with unique values for fields common to different tables, creating one-to-many (single direction) relationships between these dimension tables and the corresponding fields in the fact tables. 
    you then use the diemnsion table fields in measures, slicers, visuals, filters...
    The dimension tables provide the filter context for correct filtering and calculations

2 Replies

  • PaulDBrown's avatar
    PaulDBrown
    Community Champion

    Best practices suggest creating dimension tables with unique values for fields common to different tables, creating one-to-many (single direction) relationships between these dimension tables and the corresponding fields in the fact tables. 
    you then use the diemnsion table fields in measures, slicers, visuals, filters...
    The dimension tables provide the filter context for correct filtering and calculations

  • Anonymous's avatar
    Anonymous
    Not applicable

    katybr Hi, I don't have much details about your model, but it's depend on each table's complexity and weight. Also I believe if you merge 4 queries in one, it wouldn't be good practice in term of query performance.