current position：Home>Database implementation, confused
Database implementation, confused
2022-02-03 02:37:27 【CSDN Q & A】
It is required that books cannot be borrowed repeatedly , After the borrowing operation is completed, the borrowing information can be output , Such as ：“ The student number is , The reader named lent a book in time ”.
Give the ball bosses a clue
Refer to the answer 1：
Source table ：
User information sheet （ Student number , full name ......）
Book borrowing status table （ Book number , The name of the book , Borrowing state , Latest borrowing time , Return date ）
The goal is ：
Book borrowing information record form （ Book number , The name of the book , Student number , full name , Latest borrowing time , Agreed return date ）
Book borrowing information record history table （ Book number , The name of the book , Student number , full name , Latest borrowing time , Agreed return date , True return date , Time of the day ）
According to this borrowing status （ Lent out -1, Returned -2） To determine whether you can borrow
If lending , Then there's nothing to borrow
If not lent （ Borrowing state =2）,update Book borrowing status table Field Borrowing state =1, Latest borrowing time , True return date , -- Lend
Return the books ,update Book borrowing status table Field Borrowing state =2, Latest borrowing time , True return date -- The return
2、 Book borrowing information record form Information can be provided by User information table and book borrowing status table relation join obtain
3、 Put every day's Book borrowing information record insert To Book borrowing information record history table , In this way, you can use the history table , Find personal historical borrowing data ;
Refer to the answer 2：
author[CSDN Q & A],Please bring the original link to reprint, thank you.
The sidebar is recommended
- Read out the contents of the file "student. TXT" by line and write them to the file "hello. TXT", and add the line number to each line. It is required to output the contents of the file "hello. TXT".
- MySQL creates a database with an error
- The input of binary string in Python
- Django doesn't respond to startup
- Can pandas directly modify CSV or excel original files and save them
- In the Oracle subquery, the from is not a table but a condition. Why
- Pytorch loss = criterion (outputs, y), y has multiple values
- The most basic thing in confusion is not to understand chatting
- What's wrong with the scanner usage?
- How to display the obtained value by month, year and day?
guess what you like
Skimage module plus Gaussian noise
CDN fake domain name URL JS script
Recursive method output Huffman tree leaf node Huffman coding algorithm program
Merging word document content with VB
What should I do if pycharm runs with this error
Char function and string program running
C + + may be caused by deep and shallow copy
Defining variables in use + splicing
Why can't I install Android WiFi ADB when I use Android studio?
How does the repeater refresh the data source?
- Import the list file (. Txt) of the lottery program, export the result list file, and remove the selected code. Can you tell us what the code of these three modules means
- How to solve the problem of list index out of range
- How did you get the pop-up window of wechat applet?
- After assignment, the program stops running here
- Student information management system score summation
- What if the Java access system protection file reports an error NullPointerException
- Python printing hollow diamond
- How does Python's sympy module use the specific value input to solve the system of binary primary equations
- An error occurred while trying to install the pilot, as shown in the figure below
- Question: operator priority
- module random has no attribute choices
- I'm using the form of antd mobile When the item form is, the border bottom is cleared
- Decimal to binary, really do not know how to achieve multiple number conversion and output, C language
- Pycharm HTML edit master page call
- I hope to output the maximum, minimum and sub maximum values through sorting, but I don't know why I can't output them
- How to use C99 mode in VIM editor
- Why is RBF network often used in condition diagnosis? Why convolutional neural networks are often used in images In speech recognition?
- What if there are too many repetitions in the visual studio theme
- Why is C + + broken~
- What does the class name + [number] mean? Can all classes be used in this way?
- The pandas method concat failed to sort while merging multiple CSV files
- Python username and password authentication
- What is a hash table and a simple explanation?
- How to output pictures 1:1 in GC power 2000
- Failed to restart the service after repairing log4j vulnerability
- Java MySQL single table ten million level data summation
- Hash tables store strings using open addressing
- On the number of iterations generated in the process of ICP point cloud registration
- [urgent!] Requests in Django Post exception
- Java string accepts that the field value becomes. 2, and 0 is missing
- Ladies and gentlemen, what documents are needed in the process of data center construction? Please give a detailed document name
- MySQL connector 5.1.25 and JDBC, the deletion syntax is correct, but there is no prompt that the deletion is successful, and the program does not report an error.
- The Weblogic cluster console restarts the server and automatically deletes the TMP cache
- Application of java object-oriented array
- Why does C have pointers and python doesn't
- Want to know how to complete the following C + + program?
- Count in the string and find the English characters
- C language hexadecimal conversion to decimal and octal
- C language channel management (at least 20 channels)
- Suspected ARP attack, but different