Cardinality "highly unusual"

From: Matt M <mattm_inet_at_yahoo.com>
Date: Tue, 15 Feb 2005 17:11:31 +0700
Message-ID: <37e06nF5ec534U1_at_individual.net>



Hi

I'm learning database design and have a slight problem with a relationship I'm trying to model.

To be specific, I'm working on the example of a bookshop that sells rare and out-of-print books. Each book is tracked as a unique object, and so can be sold only once. One or more books can sold with each order. The relationship between order and book, therefore, is 1:m (an order can contain many books, but each book can be contained in only one order).

On to cardinality. If each book can be associated with up to one order, and each order contains at least one book, the cardinality should be zero-or-one to one-or-more. This is where I have a problem. The tool I'm using to model the database, MS Visio EA, complains that:

'Order_Book_FK1': Cardinality 'Zero-or-One-to-One-or-More' or
'Zero-or-One-to-Exactly-N' is highly unusual.

Is this true? If so, how should I model the book/order relationship, bearing in mind that each book can be associated with at most one order?

I should add that the text I'm working from models the relationship using a composite entity, BookOrder. This has a 1:1 identifying relationship with Book, and a m:1 identifying relationship with Order. Cardinality is not specified. However, if I try to model this relationship, Visio complains that:

'Book_BookOrder_FK1' : Relationship has a cardinality of either zero-or-one
or exactly-one, yet the child columns form part of a key.

It seems, therefore, that the solution given in the text also has its problems.

Thanks for your help

Matt M. Received on Tue Feb 15 2005 - 11:11:31 CET

Original text of this message