Using SDDM 220.127.116.117.
I've got a situation with the Logical Model that is confusing me. Can anyone shed some light for me?
I have two Entities (i.e. the things that look like tables) in my logical model. One table is Orders. The other is Order Detail.
If a row exists in the Order Detail table, it must be tied (via a PK/FK) to a row in the Orders table. In other words, the Order Detail can't just be a random row -- it has to "belong" to an order. There can be many order detail rows for a given Order (i.e. you can order multiple things on the same order, and each thing is stored on its own row in the Order Detail table).
However, a single row in the Orders table doesn't necessarily have to be associated with any rows in the Orders Detail table. For example, perhaps we just started the order and got interrupted before actually adding anything that we wanted to order. So we can have an order number (PK in the Orders table) that doesn't yet tie to any rows in the Order Detail table.
What I've just described seems to me to be a 1..0M, meaning that a single Order may be associated with any number of Order Detail rows, or none at all. If the Orders table is on the left and the Order Detail table is on the right, I THINK I should see this connector: -|-----0<-
I have set the Relation Properties as follows:
Source to Target Cardinality: - --<-* (1 Order for many Order Details)
Source Optional: UNCHECKED
Target: Order Detail
Target to Source Cardinality: --1 (1 Order per Order Detail)
Target Optional: CHECKED
Now here's where my brain is getting all wonky: The O indicating an optional constraint is located on the Orders end of the connection line. -|O-----<- and to me, that feels backwards. It feels like that's telling me that "multiple Order Detail lines can be connected to either zero or 1 order", and that's not correct. An order detail line MUST be connected to an Order. (Sure wish I could include a screenshot or two).
I feel that the O should be on the Order Detail end of the line, which to me says "one order is associated with any number of detail lines, including zero".
So to me, the position of the O feels wrong.
I can move it into what I think is the "correct" position only by reversing the CHECKED and UNCHECKED status of the Source Optional and Target Optional boxes. When I do that, the O moves, but the relation properties screen now appears wrong to me.
I know this has to be really basic Data Modeling 101 stuff, but I'm just not getting it. And I HAVE had my morning Starbucks, so that's not the trouble.
Any help in getting me thinking straight?