The database I'm currently building is pretty complicated to me. So it would be much more complicate if i try to explain so i will try to generalize. The question is at the end of the post.

So I created a little database model. The Tables are connected with a n:m relationship. Only the manufacturer and the machine tables have a 1:n relationship to machine_manufacturer. ER-Diagram

The table PlanForMakeACar holds information about to build a car and has a relationship to the table "measurementData" which holds created data while the production process.

The table "machine_manufacturing" just holds the information for the group "manufactures" which machines do they have for production.

Is that okay or do i miss something to avoid the loop? My researches showed me the following contribution: Why sould I avoid loops

  • I don't really see a loop here, more like wrong links between tables. For example between car and manufacturer at manufacturers side.
    – Vlad
    Nov 11 '16 at 10:22
  • Ah, okay my bad this was not a perfect example. I need this relationship to declare that a manufacturer has N cars. And a car (in this example) could have more manufacturer. The "manufacture" table is basically only a filter table for the car table with the information about the manufactures machines.
    – Royman
    Nov 11 '16 at 10:24
  • Does the manufacturer build cars, or does it build machines that build cars? Nov 11 '16 at 14:43
  • 2
    What is a filter table anyway? Is manufacturer an entity or not? Databases have no "filters", they have tables and relationships. Every time you say X is a "filter table" you make your point less clear,. Also ER diagrams have no "start point". Also much of the question is "lost in translation". Nov 11 '16 at 16:56
  • 1
    You need to edit your question and describe the real world situation - first. After all, your database design is only a model of the real world. There is too much commenting going on because you are not clear what you want to accomplish.
    – Jan Doggen
    Dec 14 '16 at 10:16

Loops are not in themselves a sign of a modelling problem, and I think the other question that you reference demonstrates that quite well.

It may help to think of "context" for joins, which is the concept that the business situations in which different potential joins apply express different business contexts.

For example, a person can be "connected" with a car manufacturer because she owns a car built by them. She might also be connected because she subscribes to an email bulletin from them. She might also be employed by them.

Three different contexts, and while it is conceivable that two contexts might be invoked by a query ("find all Honda owners who are not subscribed to their email bulletins"), the more usual query is going to be within one particular context, and hence not involve "loops" in the query.

I'm not aware that this concept of the "context" is in any way a formal approach to analysis, although I wouldn't rule it out, but it may be helpful to consider it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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