Many-to-many Relationships

View previous topic View next topic Go down

Many-to-many Relationships

Post  Norrland on Mon Feb 29, 2016 11:24 am

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

Norrland

Posts : 8
Join date : 2016-02-29

View user profile

Back to top Go down

Re: Many-to-many Relationships

Post  BoxesAndLines on Mon Feb 29, 2016 11:48 am

I can't imagine a scenario where the users wouldn't want to know the answer to #1.
avatar
BoxesAndLines

Posts : 1212
Join date : 2009-02-03
Location : USA

View user profile

Back to top Go down

Re: Many-to-many Relationships

Post  Norrland on Mon Feb 29, 2016 12:28 pm

Sorry I do not understand your answer

Norrland

Posts : 8
Join date : 2016-02-29

View user profile

Back to top Go down

Re: Many-to-many Relationships

Post  BoxesAndLines on Mon Feb 29, 2016 1:27 pm

You need to have a bridge table to relate users and bugs. Was that your question?
avatar
BoxesAndLines

Posts : 1212
Join date : 2009-02-03
Location : USA

View user profile

Back to top Go down

Re: Many-to-many Relationships

Post  ngalemmo on Mon Feb 29, 2016 1:40 pm

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?
avatar
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

View user profile http://aginity.com

Back to top Go down

Re: Many-to-many Relationships

Post  Norrland on Mon Feb 29, 2016 2:03 pm

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

Norrland

Posts : 8
Join date : 2016-02-29

View user profile

Back to top Go down

Re: Many-to-many Relationships

Post  ngalemmo on Mon Feb 29, 2016 5:55 pm

'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.
avatar
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

View user profile http://aginity.com

Back to top Go down

Re: Many-to-many Relationships

Post  Norrland on Mon Feb 29, 2016 6:59 pm

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

Norrland

Posts : 8
Join date : 2016-02-29

View user profile

Back to top Go down

Re: Many-to-many Relationships

Post  Norrland on Tue Mar 01, 2016 11:52 am

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

Norrland

Posts : 8
Join date : 2016-02-29

View user profile

Back to top Go down

Re: Many-to-many Relationships

Post  Norrland on Tue Mar 01, 2016 11:54 am


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

View user profile

Back to top Go down

Re: Many-to-many Relationships

Post  BoxesAndLines on Tue Mar 01, 2016 12:19 pm

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!
avatar
BoxesAndLines

Posts : 1212
Join date : 2009-02-03
Location : USA

View user profile

Back to top Go down

Re: Many-to-many Relationships

Post  Norrland on Tue Mar 01, 2016 12:25 pm

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

Norrland

Posts : 8
Join date : 2016-02-29

View user profile

Back to top Go down

Re: Many-to-many Relationships

Post  Norrland on Tue Mar 01, 2016 12:34 pm


Please look this model what do you think


model

Norrland

Posts : 8
Join date : 2016-02-29

View user profile

Back to top Go down

Re: Many-to-many Relationships

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum