Should this be one to Many or Many to Many.. Relationship

A

Ahmed

Hi,

New to Access learning... I have
Table 1.. Publisher
Table 2.. Books

I was wondering .. Should I create Transient Third Table e.g.
BooksPublisher..
Or Should I put PublisherID key AS Foreign key into Books Table ?
which would be Practical

E.g Books Publishers
BooksNPublishers
Pk BookID Pk PublisherID PK
BookPublisherID

Fk BookID

Fk PublisherID

OR

Publishers Books
PK PublisherID PK BookID
Fk
PublisherID

Could Somebody guide me

Thanks in Advance
Ahmed Khalak
 
A

Allen Browne

To answer your question, which of the following do you need to handle:

a) Any book has only ONE publisher.
Therefore a foreign key in the Books table would be enough.

OR

b) A book can have more than one publisher.
Therefore you need the junction table.

In general (a) is adequate. You look on the back of the title page, and you
can discover who the publisher was.

In rare cases, a classic book does get republished by a different publisher.
If you *must* treat this as the same book (e.g. in a large library system),
then you need to use (b).

Another aspect you may want to consider is whether your cataloguing system
should handle resources other than books (e.g. movies, lecturers on video,
music CDs, web pages, ...) If so, you may find it worth thinking through the
angles discussed in this article:
Library resource example
at:
http://allenbrowne.com/AppLibrary.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top