M
Mart
I've been battling for a few days trying to understand how best to design a
DB for a collection of children's books, with associated authors and
illustrators. I've received much help (thanks Tina and others), but I'm
clearly not even getting the basics. So...
I have set up 4 tables, as there are four main streams of information,
namely tblBooks, tblAuthors, tblIllustrators and tblKeywords. But...
1. I don't have a clue as to how the relationships should be established
between any of the tables, especially how the tblKeywords (which is a list of
words that may apply to the content of any book, and of which there may of
course be more than one choice per book) relates/links with the tblBooks, so
that the user can select any number of keywords to narrow down the number of
books returned.
2. There is clearly a many-to-many relationship between tblBooks and all the
other tables. As a start I have tried (and failed) to set up a third junction
table between tblBooks and tblAuthors, but I just can't do it. Where I get
stuck is how to actually get the Primary Keys from the two main tables into
the junction table. As an example, both Primary Keys of the two main tables
are ID's with the datatype set to Autonumber. But, when I make the junction
table I need to start it with one field, so presumably can't set its datatype
to autonumber (or what am I missing here?). Also, what other fields should go
into this junction table?
At this point I should say that no book's author is also it's illustrator
and vice-versa, but a book could have more than one author or illustrator.
Thanks for bearing with me
Mart
DB for a collection of children's books, with associated authors and
illustrators. I've received much help (thanks Tina and others), but I'm
clearly not even getting the basics. So...
I have set up 4 tables, as there are four main streams of information,
namely tblBooks, tblAuthors, tblIllustrators and tblKeywords. But...
1. I don't have a clue as to how the relationships should be established
between any of the tables, especially how the tblKeywords (which is a list of
words that may apply to the content of any book, and of which there may of
course be more than one choice per book) relates/links with the tblBooks, so
that the user can select any number of keywords to narrow down the number of
books returned.
2. There is clearly a many-to-many relationship between tblBooks and all the
other tables. As a start I have tried (and failed) to set up a third junction
table between tblBooks and tblAuthors, but I just can't do it. Where I get
stuck is how to actually get the Primary Keys from the two main tables into
the junction table. As an example, both Primary Keys of the two main tables
are ID's with the datatype set to Autonumber. But, when I make the junction
table I need to start it with one field, so presumably can't set its datatype
to autonumber (or what am I missing here?). Also, what other fields should go
into this junction table?
At this point I should say that no book's author is also it's illustrator
and vice-versa, but a book could have more than one author or illustrator.
Thanks for bearing with me
Mart