Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have three entities :

Technician
Vehicle
Repair

The question is how to model this in ERD? Knowing that a technician can repair multiple cars, and the same car can be repaired by one and only one technician? How should the repair entity tied to all this?

share|improve this question
    
Would this be better asked on dba.stackexchange.com/questions ? If so, ask a moderator to migrate this question for you. –  FrustratedWithFormsDesigner Nov 5 '12 at 19:21
1  
What is the repair entity? so far you haven't described what it actually is, you seem to understand the relationship between technician and vehicle in both directions. –  Ryathal Nov 5 '12 at 19:31

2 Answers 2

up vote 6 down vote accepted

You need to specify more description of your tables and of your requirements. Anyway, here is one way to model the tables. However, in a real application there would be other things to consider. Only PKs and FKs are shown. Other columns depend on your case.

enter image description here

share|improve this answer

CONCEPTUAL

CONCEPTUAL

Note that in the ERD ( conceptual data model ) you don't specify the foreign keys, they are implicit in the relationship ( lines ).

Your data modeling tool will generate the foreing keys for you when you generate the physical data model (RDBMS dependant):

PHYSICAL

PHYSICAL

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.