Two substantially different but similar cases: Are they the same in terms of table cadinality

database-designschematable

Imagine these different cases when designing a database:

Case 1:

One book (only one instance of a title physically) can be borrowed by many people, but only one person at once but many people during a time period.

Case 2:

Multiple instances of the same book physically (same title) can be borrowed by many people at the same time (obviously) in the one and same library only as before.


Would these two cases produce the same result when designing a relational schema?

If someone comes up with a better title for this question I will gratefully accept a change.

Best Answer

It's common to confuse a Thing (a physical book) with the Specification of that Thing (the idea of the book)

Say you have a Book Specification:

Title: Moby Dick
Format: Hard Cover
ISBN: 0840769008

Then you also have a Book Asset:

ISBN: 0840769008 (refers to Specification)
Serial Number: 1234
Condition: poor

People can borrow a Book Asset (I borrowed a particular copy).

People can reserve a Book Specification (I want to borrow that book but I don't care which copy I get)

So in your case, for one book, you'd have a specification for it, and one asset. For multiple, you'd have one specification and multiple assets

You'd design the same schema for both scenarios, by using Specification has many Assets, Asset belongs to Specification