I did not fully realize what to set up the going to this, but here's the one thing:
If I wish to have the ability to possess a table Consultant, the user as well as their private information, and that i want this user to have the ability to choose their proficiency in many Programs (software) on the scale from -5 (zero being no training whatsoever), how do you do that best?
I am talking about I will have a Consultant table having a one-to-many relationship to some Program table, after which have the limited Programs availalbe loaded by an XML file or something like that, as well as for each Consultant connect all of the Programs as well as their Amounts of proficiency. But that appears very wrong and inefficient.
It appears in my experience I ought to possess a table with the (small group of) Programs, after which by some kind of association between your two by Ids. However I can't get my mind around how to get this done. I am thinking many-to-many... However, is correct? Next, how do you do that within an Entity Framework Model? It's my job to create my database code first, i.e. produce the EF model, after which generate database from model. Am I Going To obtain a junction table where I'm able to add the amount area, because essentially an advisor Includes A Program with an amount, or really a listing of Programs each with an amount.
I am too unskilled with databases to find this out. A step-by-step explanation could be greatly appreciated!
Create three tables:
ConsultantProficiency may have these posts:
- ConsultantId - FK to Consultant
- ProgramId - FK to Program
Mark ConsultantId and ProgramId as PK of table.
Add these tables to entity model - it'll create three organizations with all of relations and navigation qualities. You may also start using this method in EDMX and let EF generate DB for you personally.
The purpose here is you can't hide junction table because you need to set Level to supplement property. Many-to-many could be expressed directly (hide junction table) only when you don't have to add any extra data to junction table.