I have been stuck on trying to find a solution to attached circular reference. I would be eternelly thankful if anyone could help.
I cannot just get rid of connection between 'statystyki_ogloszen' and 'firmy' tables, because there are more values for ID_Oferty in 'statystyki_ogloszen' than in 'historia_aplikacji' and therefore I would lose a proper connection between ID_Firmy and ID_Oferty.
I have tried to figure out some link tables solution, but it just does not add up in this case for me.
The root of the problem can be shortened to the following:
1) statystyki_ogloszen - ID_Oferty - Nazwa_Firmy
2) firmy - ID_Firmy - Nazwa_Firmy
3) rekruterzy - ID_Firmy - ID_Rekrutera
4) historia_aplikacji - ID_Oferty - ID_Rekrutera
So as you can see, there are 4 dimensions, each one is in 2 different tables, which altogether makes a crappy circular reference.
Yes, I definitely need it. 'historia_aplikacji' is a table with history of changes made by recruiters on particular applications for particular job offers. There can be multiple recruiters changing the same application, so I need to know exactly who made the change.
'firmy' means "companies". The table contains basic information about companies It is linked to: -> 'rekruterzy' (recruiters), by ID_Firmy (company_id). This table shows which recruiters belong to which companies. -> 'statysytki_ogloszen' (offers_statistics), by Nazwa_Firmy (company_name). This table shows a list of job offers, offered by given companies + their basic results.
The 'historia_aplikacji' (application_history) table shows changes that have been made historically on applications for job offers. It has to show the ID_Oferty (offer_id) and ID_Rekrutera (recruiter_id), because I need to know who is making changes on which application for which offer. Thus, it is also linked with 'statysytki_ogloszen' (offers_statistics) and 'rekruterzy' (recruiters), which creates the loop.