Forum Discussion

Qlimax's avatar
Qlimax
New Member
6 years ago
Solved

Multiple active relationships between 2 Tables

Dear Community,

 

actually I am struggeling with our database and some special scenarios I want to measure:

 

Scenario: I have at least these 2 tables, named document and user.

A document has the columns checked_by, date_checked_by and marked_for_review by, which are in a many to one (*:1) relationship to the users. So in a nutshell, a document has 3 columns which can be edited by different users.Modell

 

Problem:

I want to count the number of documents a user edits, separated in checked_by, date_checked_by and marked_for review by in a table, let's say for a day or a special period. This works fine for the amount of checked_by, because here we have an active relationship. But the numbers of the other two columns are wrong, it seems like there is something like a XOR changing the results.

 

 

What have I tried until now:

- Copying the user table to a user2 table, which works but is really nasty IMHO and leads to a overhead in several queries, visualisations etc. 

 

 

What am I doing wrong? What am I overlooking?

 

 

Thank you for your help in advance!

3 Replies