如何实现规范化? [英] how to implement normalisation?

查看:159
本文介绍了如何实现规范化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Q1:-对以下数据进行归一化并在mysql中进行设计?
PatientName,PatientNumber,PatientCondition,DoctorRegistration,PatientSignin,PatientSignout,DoctorRDO,医院名称,医院地址,门诊病人,NumStaff,NumBeds,DoctorName,AssignedDoctor

我做了这个
如果我错了,请纠正


第一个规范化<</b>/big>
医院桌




医院名称
Hospital_Address
NumStaff
NumBeds
DoctorRDO
门诊病人
Doctor_Registration
Doctor_Name

患者表



DoctorRDO
Patient_Number
Patient_Name
Patient_Condition
PatientSignin
PatientSignout
Assigned_Doctor



第二次标准化
医院详细信息表




医院名称
Hospital_Address
NumStaff
NumBeds
门诊

Hospital_Address是主键

患者表



DoctorRDO
Patient_Number
Patient_Name
Patient_Condition
PatientSignin
PatientSignout
Assigned_Doctor

在这里,Patient_Number是主键,而DoctorRDO是外键

Doctor_Details表



DoctorRegistration
DoctorRDO
DoctorName

在这里,Patient_ Number是外键,而DoctorRDO是主键


第三次标准化

医院详细信息表




医院名称
Hospital_Address
NumStaff
NumBeds
门诊

患者表




DoctorRDO
Patient_Number
Patient_Name
Patient_Condition
PatientSignin
PatientSignout

在这里,Patient_Number是主键,而DoctorRDO是外键


Doctor_Details表



DoctorRegistration
DoctorRDO
DoctorName


Assigned_Doctor_Details表

DoctorRDO


Patient_Number




在此先感谢
问候

Q1:-Perform normalisation on the following data and design it in mysql?
PatientName, PatientNumber, PatientCondition, DoctorRegistration, PatientSignin, PatientSignout, DoctorRDO, Hospital Name, Hospital Address, Outpatients, NumStaff, NumBeds, DoctorName, AssignedDoctor

i performed this
please correct if i am wrong


1st Normalisation<</b>/big>
Hospital Table




Hospital_Name
Hospital_Address
NumStaff
NumBeds
DoctorRDO
Outpatients
Doctor_Registration
Doctor_Name

Patient Table



DoctorRDO
Patient_Number
Patient_Name
Patient_Condition
PatientSignin
PatientSignout
Assigned_Doctor



2nd Normalisation
Hospital_Details Table




Hospital_Name
Hospital_Address
NumStaff
NumBeds
Outpatients

Hospital_Address is primary key

Patient Table



DoctorRDO
Patient_Number
Patient_Name
Patient_Condition
PatientSignin
PatientSignout
Assigned_Doctor

Here, Patient_Number is primary key and DoctorRDO is foreign key

Doctor_Details Table



DoctorRegistration
DoctorRDO
DoctorName

Here, Patient_ Number is foreign key and DoctorRDO is primary key


3rd Normalisation

Hospital_Details Table




Hospital_Name
Hospital_Address
NumStaff
NumBeds
Outpatients

Patient Table




DoctorRDO
Patient_Number
Patient_Name
Patient_Condition
PatientSignin
PatientSignout

Here, Patient_Number is primary key and DoctorRDO is foreign key


Doctor_Details Table



DoctorRegistration
DoctorRDO
DoctorName


Assigned_Doctor_Details Table

DoctorRDO


Patient_Number




Thanks in advance
regards

推荐答案

如果要将患者与多家医院联系起来,则需要小心.
If you want to associate the patient with multiple hospital, then it needs to be taken care.


这篇关于如何实现规范化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆