I'm not sure that I am using good conditions, so first I will try to explain my problem.
I have a cross-reference table, CompetenceCollab , which contains associations between people and their competencies. This table has two primary keys, a user identifier and a competency identifier. At this point, everything is in order.
However, the new function that I have to add is the following: people should be able to add ratings to other people's competencies. This basically means that I have to add a new table, which will contain the note that it gave, and somehow link to the CompetenceCollab table. One of my colleagues told me that I can use what he called an “alternative key”, defining two foreign keys, one for each primary column of CompetenceCollab , and somehow tell the database that each rating is related to competency and by people.
So my questions are:
- First of all, this design seems completely insane, and if so, how should I do it?
- I need to use Doctrine ORM in Symfony. Can this be used? If so, can someone provide me a way to define it in a YAML file?
Thanks for the help, feel free to ask questions in the comments, I don't know if this was really clear.
source share