Many-to-many Relationships
3 posters
Page 1 of 1
Many-to-many Relationships
Dear Everyone,
I have modelized a Star from an operational of Bugs Tracker ( Mantis)
I have two options.
1) M:N 1 user have many bugs and 1 bug have many users
2) The relation M:N has been denormalized and I have eliminated the ID_Bugs from the fact table.
Id_Bugs is a correlative number which is generated when I create a Bug
Please let me know which option the best is
Thanks in advance.
Best Regards
Antonio
I have modelized a Star from an operational of Bugs Tracker ( Mantis)
I have two options.
1) M:N 1 user have many bugs and 1 bug have many users
2) The relation M:N has been denormalized and I have eliminated the ID_Bugs from the fact table.
Id_Bugs is a correlative number which is generated when I create a Bug
Please let me know which option the best is
Thanks in advance.
Best Regards
Antonio
Norrland- Posts : 8
Join date : 2016-02-29
Re: Many-to-many Relationships
I can't imagine a scenario where the users wouldn't want to know the answer to #1.
BoxesAndLines- Posts : 1212
Join date : 2009-02-03
Location : USA
Re: Many-to-many Relationships
Sorry I do not understand your answer
Norrland- Posts : 8
Join date : 2016-02-29
Re: Many-to-many Relationships
You need to have a bridge table to relate users and bugs. Was that your question?
BoxesAndLines- Posts : 1212
Join date : 2009-02-03
Location : USA
Re: Many-to-many Relationships
I don't get the question. You have users, they find bugs. I get that.
Users report bugs. How does Mantis record this fact? If it is like any other support system, a ticket is created and it contains information about the user and the bug. I would also assume there is some mechanism in the system that consolidates these reports when it is determined they are reporting the same problem.
So, from a dimensional modeling point of view, the fact is the problem ticket. One row per problem.
The relationship between a bug and a user is in the fact row. It contains a FK to a bug and a FK to a user. This is not M:M. If a user reports multiple bugs, you create multiple rows. Collectively, given many rows with keys to users and bugs, the relationship is M:M (as is the case with any fact table). So what is the problem?
Users report bugs. How does Mantis record this fact? If it is like any other support system, a ticket is created and it contains information about the user and the bug. I would also assume there is some mechanism in the system that consolidates these reports when it is determined they are reporting the same problem.
So, from a dimensional modeling point of view, the fact is the problem ticket. One row per problem.
The relationship between a bug and a user is in the fact row. It contains a FK to a bug and a FK to a user. This is not M:M. If a user reports multiple bugs, you create multiple rows. Collectively, given many rows with keys to users and bugs, the relationship is M:M (as is the case with any fact table). So what is the problem?
Re: Many-to-many Relationships
Thank you.
I will post a reply tonight with an image of model 1 and model 2. I will try to upload and image
Model 1 use a bridge and model 2 denormalize the M:M dimension and dont use the bridge.
The fact table is the BUG
Please wait for tomorrow because here (MADRID SPAIN) is 20.02 pm and I have to go back home from work
Best Regards
I will post a reply tonight with an image of model 1 and model 2. I will try to upload and image
Model 1 use a bridge and model 2 denormalize the M:M dimension and dont use the bridge.
The fact table is the BUG
Please wait for tomorrow because here (MADRID SPAIN) is 20.02 pm and I have to go back home from work
Best Regards
Norrland- Posts : 8
Join date : 2016-02-29
Re: Many-to-many Relationships
'The fact table is the BUG'
That is the basis of your problem. A fact table is a business event or state, a bug is a dimension... it is a context.
A fact table represents an event or state relating to the bug... such as reporting a bug, work performed resolving a bug and so on. There could be multiple fact tables representing different types of events. Different facts would be used to perform different types of analysis.
So, if you want to know who reported a bug, you need a fact that contains bug reports. This would reference the bug and the user making the report. If you want to know the progress in resolving a bug, you need a fact table that tracks the events of the resolution process. This could include dimensions such as the bug, who did the work, when and so on. This latter fact would not contain a reference to users since it does not make sense in this context.
That is the basis of your problem. A fact table is a business event or state, a bug is a dimension... it is a context.
A fact table represents an event or state relating to the bug... such as reporting a bug, work performed resolving a bug and so on. There could be multiple fact tables representing different types of events. Different facts would be used to perform different types of analysis.
So, if you want to know who reported a bug, you need a fact that contains bug reports. This would reference the bug and the user making the report. If you want to know the progress in resolving a bug, you need a fact table that tracks the events of the resolution process. This could include dimensions such as the bug, who did the work, when and so on. This latter fact would not contain a reference to users since it does not make sense in this context.
Re: Many-to-many Relationships
Operational Mantis
Model 1
Model 2
Please see firts the operational E-R and the two models , 1 contains N:M and 2r N:M denormalized. Let me know what you thing.
I do not understand because Fact table is not the Bug , at the beggining I design BUG as dimension but the dimensions are category , Date , severity , etc and Finally Fact table was Bug
Model 1
Model 2
Please see firts the operational E-R and the two models , 1 contains N:M and 2r N:M denormalized. Let me know what you thing.
I do not understand because Fact table is not the Bug , at the beggining I design BUG as dimension but the dimensions are category , Date , severity , etc and Finally Fact table was Bug
Norrland- Posts : 8
Join date : 2016-02-29
Re: Many-to-many Relationships
BoxesandLines,
You are not very polite answering questions. You are not Kimball. I thing you have to study Kimball before written that I am wrong
Thank you for nothing
You are not very polite answering questions. You are not Kimball. I thing you have to study Kimball before written that I am wrong
Thank you for nothing
Norrland- Posts : 8
Join date : 2016-02-29
Re: Many-to-many Relationships
You are not very polite answering questions. You are not Kimball. I think you have to study Kimball before writting that I am wrong
Thank you for nothing
Norrland
Posts: 5
Join date: 2016-02-29
View user profile Send private message
Back to top
Norrland- Posts : 8
Join date : 2016-02-29
Re: Many-to-many Relationships
Norrland wrote:BoxesandLines,
You are not very polite answering questions. You are not Kimball. I thing you have to study Kimball before written that I am wrong
Thank you for nothing
Dios Mio!
I never stated you were wrong. Where did I state that? I said the users will want to know which users submitted which bugs. Nonetheless, I will leave you in Ngalemmo's capable hands. Adios mi amigo!
BoxesAndLines- Posts : 1212
Join date : 2009-02-03
Location : USA
Re: Many-to-many Relationships
Hello,
Thank for your answer. Mi amigo., compaņero, camarada :-)
Please look the previous links with the images with the models in the post and let me know your thoughts.
I will follow your advices.
Sorry today I have had a bad day .
I have to deliver the model to the customer and nobody here help me .
Thanks in advance.
Best Regards
Antonio
Thank for your answer. Mi amigo., compaņero, camarada :-)
Please look the previous links with the images with the models in the post and let me know your thoughts.
I will follow your advices.
Sorry today I have had a bad day .
I have to deliver the model to the customer and nobody here help me .
Thanks in advance.
Best Regards
Antonio
Norrland- Posts : 8
Join date : 2016-02-29
Re: Many-to-many Relationships
Please look this model what do you think
model
Norrland- Posts : 8
Join date : 2016-02-29
Similar topics
» Are one to one relationships bad?
» One to many relationships
» Same attribute in multiple dimensions or Create new dimension?
» mutilple One to Many relationships
» Aggregating Many to Many relationships
» One to many relationships
» Same attribute in multiple dimensions or Create new dimension?
» mutilple One to Many relationships
» Aggregating Many to Many relationships
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum