Question

I am currently drawing a schema-database. I was wondering if my database works, in particular looking at the entities ResourceType and OutstandingProblem, who do not have a Primary keys (only foreign)...

Primary keys are underlined, foreign keys have * database

Is this design okay? Thank you!

Was it helpful?

Solution

It looks like the primary key of OutstandingProblem could be jobId if your Job cardinality of "1 to 1" is correct. ResourceType looks like it should have a composite primary key: (technicianID, resourceID).

The cardinality "many to many" between ResourceType and Technician looks questionable. That would seem to imply that technicianID is a multi-valued attribute in ResourceType - not necessarily "wrong" but a fairly unusual way to express things in ER modelling. Many DBMSs don't support multi-valued attributes at all.

Keys are an essential part of semantic modelling and database design. If you haven't identified keys for all your entities then you should assume that your analysis and design is incomplete.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top