SQL 考试标准化问题

SQL Exam Normalisation issue

目前正在攻读软件工程学位。我在这方面研究的主要课题之一是数据库。我刚刚参加了这个模块的模拟考试,我遇到了关于将数据库规范化为 3NF 的问题。

我问这个问题的原因是模拟考试的评分表明归一化后的最终表格总数为5。但是我得到了4,我很好奇我哪里错了

Image of the un-normalised data to be normalised

我得到的决赛桌如下

Batch_id、Agent_id、Agent_name

batch_id, holiday_code

holiday_code, airport_id, 价格, 数量

airport_id,机场

当我写下来的时候,我想到了以下table:

Agent: agent_id, name
Holiday: holiday_code, price, airport_id
Airport: airport_id, airport_name
Batch: batch_id, agent_id
BatchLine: batch_id, holiday_code, quantity

您的答案:

Batch_id, Agent_id, Agent_name

Agent_id、agent_name,否则你会在第一个 table 中重复 agent_name – Joakim Danielson

holiday_code, airport_id, price, quantity

代码 B563 不匹配(不同数量)