Hi...
i'm trying to do up a basic library database, and having problems with one part...
one of the tables (BOOKS) will have fields: "BOOK ID"(Primary Key), and "Number of Copies".
On another table(Book copies), I'm trying to generate unique call numbers for each copy of a book. There would then be two fields in this table: "BOOK ID"(foreign key) which will, according to the value of "Number of Copies", generate out unique call numbers for the book copies.
Rather confusing, so i use an example:
If i were to buy 5 copies of a new book, say Cinderella (ID: B0001) for the Library, i would key in ID: "B0001", Number of Copies: "5" in the BOOK table.
I then need the other table (BOOK COPY) to generate out 5 unique call numbers for me, when i key in ID: B0001 in the BOOK COPY table.
for eg, when i key in B0001, the following are generated: "C0001", "C0002", "C0003", "C0004" and "C0005" to represent each unique copy of the book.
Is this possible?
Or is there at least a way to make it easier for the data entry guy than to have to do it manually (ie. think up 5 unique call numbers for the books and key them in himself) ???
i'm trying to do up a basic library database, and having problems with one part...
one of the tables (BOOKS) will have fields: "BOOK ID"(Primary Key), and "Number of Copies".
On another table(Book copies), I'm trying to generate unique call numbers for each copy of a book. There would then be two fields in this table: "BOOK ID"(foreign key) which will, according to the value of "Number of Copies", generate out unique call numbers for the book copies.
Rather confusing, so i use an example:
If i were to buy 5 copies of a new book, say Cinderella (ID: B0001) for the Library, i would key in ID: "B0001", Number of Copies: "5" in the BOOK table.
I then need the other table (BOOK COPY) to generate out 5 unique call numbers for me, when i key in ID: B0001 in the BOOK COPY table.
for eg, when i key in B0001, the following are generated: "C0001", "C0002", "C0003", "C0004" and "C0005" to represent each unique copy of the book.
Is this possible?
Or is there at least a way to make it easier for the data entry guy than to have to do it manually (ie. think up 5 unique call numbers for the books and key them in himself) ???