关系代数帮助
我是关系代数的新手,发现它很困难。我已经回答了几个问题;然而,它们相对简单。不过,可以在这些方面提供帮助。
数据库
Patient (PatientCode, PatientSurname, PatientFirstname, PatientSex, PatientAge,
PatientOccupation, PatientHeight, PatientWeight, PatientAddress)
Doctor (DoctorCode, DoctorSurName, DoctorFirstName, DoctorPrivateAddress,
MobileNo, Doctor Specialisim)
Operation (Operation Code, PatientCode, DoctorCode, Date, Time, Result,
OperationType)
Is_Seen_By (PatientCode, DoctorCode, Date, Time)
查询
查找被医生“DR333”做过手术的患者的姓氏和性别,结果没有成功。
查找 2010 年 11 月 18 日已完成且成功的操作的代码。另请列出参与手术的医生姓名。
I'm new to relational algebra and finding it difficult. I've answered a few questions; however, they where relatively simple. Could do with help with these though.
Database
Patient (PatientCode, PatientSurname, PatientFirstname, PatientSex, PatientAge,
PatientOccupation, PatientHeight, PatientWeight, PatientAddress)
Doctor (DoctorCode, DoctorSurName, DoctorFirstName, DoctorPrivateAddress,
MobileNo, Doctor Specialisim)
Operation (Operation Code, PatientCode, DoctorCode, Date, Time, Result,
OperationType)
Is_Seen_By (PatientCode, DoctorCode, Date, Time)
Queries
Find the surname and gender of the patients that have been operated on by doctor "DR333" and results have not been successful.
Find the code of the operations that have been done on the 18th of November 2010 and have been successful. Please also list the name of the doctors which were involved with the operation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能是完全错误的,也可能不是完全错误的,我刚刚结束了很长的计算机休假。它的 SQL 应该类似于:
Q1:
Q2:
This may or may not be totally wrong, I'm back from a very long computer sabbatical. The SQL for it should be something like:
Q1:
Q2: