MySQL Forums
Forum List  »  General

Re: Query - multiple joins won't return any records
Posted by: Bad Programmer
Date: February 15, 2015 02:33PM

Sorry, my descriptions here look clear to me. You can't understand so I'm obviously not getting accross.

Teams, divisions, whatever - are involved with a 'work'.
My client selects what 'entities' (teams, divisions, etc.) are involved.
They can select whatever entities they deem 'involved', including multiples.
The entities don't mean anything specific to me (what is a 'team'?), they mean something to my client.

A person answers questions on a 'work' with a score.

The only relationship between the 'entities' is that they were involved with the same 'work'.

I need to produce reports showing score averages. The client wants to see 1, 2 and up to 3 (if more than divisions & teams are 'entities') tiers as shown in my OP.


I can design it to work but the design is horrible.
If I create an id field for each 'entity' in the scores (or relations) table (for example DivisionID, TeamID, WhateverID) and make them varchars instead of ints I can comma separate multiples of a given 'entity' per row.

With that I *can* create the reports but I *hate* the design. It results in a badly bloated database, a lot of array programming and real slow reports.

I was hoping someone might have a better idea.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.