Django和数据库的同时操作

发布于 2025-02-12 09:13:37 字数 189 浏览 1 评论 0原文

我正在Django 3系统上开发。我在后端使用MySQL。我有一个设计问题。我有一个医生和患者系统。患者已在系统中注册。医生在页面上看到患者,按下按钮并带病人。当3名医生同时打开页面时,所有人都会看到病人叫詹妮弗(Jennifer)。好吧,如果他们同时按下Get Jenifer患者按钮,会不会发生冲突?我如何防止这种情况?对于此并发操作,我该怎么办才能防止例外。

I am developing on Django 3 system. I am using mysql at backend. I have a design question. I have a system of doctors and patients. The patient is registered in the system. Doctors see the patient on their page and push a button and take patient. When 3 doctors open their pages at the same time, all of them will see the patient named Jennifer. Well, if they press the get jenifer patient button at the same time, wouldn't there be a conflict? How do I prevent this? What can i do for this concurrent operation to prevent exceptions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文