作为家庭作业的一部分,我被要求根据案例研究创建表格,并且所有表格都必须是 3NF。但是,我已经尝试并试图理解 3NF,但我只是没有掌握它的窍门,希望能得到一些帮助。
案例研究的要求是针对兽医诊所的:
- 允许宠物预约
- 记录宠物治疗
- 记录哪位兽医进行了治疗
- 记录企业出售的物品以提供信息,使企业能够生成库存清单以从供应商处购买
不需要:记录所有销售
到目前为止,我有以下表格:
职员:
| staff_ID | firstName | lastName | gender | address_ID | contactNumber | partTimeOrFullTime | salary |
员工地址表:
| address_ID | staff_ID | number | street | city | county | postalCode |
兽医表:
| staff_ID | appointment_ID |
兽医护士:
| staff_ID | appointment_ID |
预约表:
| appointment_ID | customer_ID | staff_ID | patient_ID | date | time |
initial_appointment 表:
| appointment_ID | customer_ID | patient_ID | diagnosis | treatment |
跟进预约:
| appointment_ID | customer_ID | patient_ID | diagnosis | treatment |
病人:
| patient_ID | customer_ID | animal_type | gender | weight | height | previous_Appointments | previous_Treatment |
产品:
| product_ID | name | product_Category | animal | price | quantity_Available | reOrder_Level |
product_sold:
| sale_ID | product_ID | sale_Date |
供应商:
| supplier_ID | product_ID | contactNumber | email |
供应商地址:
| supplierAddress_ID | supplier_ID | doorNumber | street | city | town | postalCode |
存货:
| name | product_ID | quantity_Available | price |
谢谢!