Create four tables in the database, namely, readersjs table, lendsjs table, booksjs table and historysjs table.
(1) The reader list contains basic information of readers, such as reader number, name, gender, date of birth, department, major, borrowing times, photos, etc. In the reader table, set the reader ID number as the primary key.
(2) Borrowing slip is used to store the relevant information of students' borrowing. Information about borrowing and returning books will be recorded on the borrowing list. The borrowing list mainly includes the borrowing card, isbn number of the book and borrowing time. loan
The library card number set in the reading table and the isbn number of the book are both primary keys.
(3) Book list records information related to books. Such as isbn number, title, author, publishing house, borrowing, number of copies, inventory, etc. Students can find what they need through the library website.
Whether the books to be borrowed are still in stock and some basic information about the books. In the book table, set the isbn number as the primary key.
(4) In the history table, some information about book borrowing is mainly stored. As long as you borrow it, whether you haven't returned it or not, it will be recorded in the history table. There will be library card number and isbn number in the history table.
Borrowed time, returned time. In the history table, set the borrowing card number and isbn number as the primary key of the table.
Relationship model: reader list (library card number, name, gender, date of birth, department, major, borrowing volume, photos)? History table (library card number, isbn, borrowing time, return time)? Borrowing desk
(Book number, isbn, isbn, borrowing time) Book list (ISBN, title, author, publisher, pricing, number of copies, inventory)