Home > database >  Urgent please!!!!!! The code of the library and book button
Urgent please!!!!!! The code of the library and book button

Time:10-03

You kind of warrior who has a library, library system and book button code, give in issued a: no, thank you very much!!!!!

CodePudding user response:

The building Lord, brothers and sisters of the jar is not your belly tapeworm, can't give you what code,

CodePudding user response:

Just the same, I can change,

CodePudding user response:

Borrow books
Update the book set the status=1 where book_id=: il_id;
commit;
Return the book
Update the book set the status=0 where book_id=: il_id;
commit;
Ok, you can go to change the building Lord,

===================
Who can guess how your database design?
Who knows what kind of is your dw?

In fact you not ask, borrow books, but also the logic of the book,

I wrote the above two SQL statements, is very simple,
Suppose I to do a simple library management, no matter anything, just the current state of the books (checked out, didn't lend),
Database design, there is a table called the book, id field is the primary key (used to identify different books), the status field is a flag bit (1 0 means not lend, says it has lent),
So, when I return the book as long as the status can be set to 0, when it comes to be set to 1,

Slightly more function, can increase a library card related tables, borrowing record, etc., may be 100 people there are 100 design,

So, your question it's idea,

CodePudding user response:

Library is more complex:
1, first consider, and verify the existence of the readers, legal, availability,
2, check whether readers lending situation, has reached the maximum number of lent,
3, check the readers borrow books information, look to whether can lend,
Return the book is simple:
Update the data according to the state of library book information can!

CodePudding user response:

Too much is not the same as

State of the book has a field labels, is it lent, or in the pavilion

Borrowed time change state
Also the modify state

CodePudding user response:

Support 3 floor
Indeed, can consider the plan is really too much, and even the same solution, using a different table structure, or after a lot of difference between
First of all to maintain bibliography, facilitate retrieval, but also maintain the books the number of varieties, but light has the bibliography is not enough, also must have the physical books list (this is because a variety of books, there may be more than this, each state is different), for some precious books, also can consider to add authority level, only allowed some readers lending, or not allowed to lend, only read inside the library, etc.
Next to a reader in the directory, maintain the reader's status, rights, etc., may, when necessary, to increase readers borrow books list
Third, we should maintain records of the library, that is, each time to borrow, to record borrowing time, return time, as well as other relevant information, (here also need to modify the state of the bibliography, and readers' borrowing status)

CodePudding user response:

Have any PB can master to moonlight as a training instructor? If an interested friends, please send resume to: [email protected], please contact: QQ: 174629429 MSN:[email protected]
  • Related