简体   繁体   English

在关系数据模型中规范化为Boyce Codd范式

[英]Normalize to Boyce Codd Normal Form in relational data model

OK this is probably very basic for the majority of you, but I'm struggling to do this assignment (Yep, it's homework). 好的,对于大多数人来说,这可能是非常基本的,但是我正在努力完成这项任务(是的,这是家庭作业)。 I've attempted this twice now and failed both times so far. 我现在已经尝试过两次,但到目前为止都失败了两次。

I need to create a relational data model in Boyce Codd Normal Form. 我需要以Boyce Codd Normal Form创建一个关系数据模型。 Here are the details: 详细信息如下:

The Airport Authority in a small nation requires a database to store information about airlines, pilots and planes. 一个小国的机场管理局需要一个数据库来存储有关航空公司,飞行员和飞机的信息。

There is only one airport but several airlines use it. 只有一个机场,但有几家航空公司使用它。 For each airline its identification code and full name is required together with the phone number of its local office. 对于每家航空公司,都需要提供其识别码和全名以及其当地办事处的电话号码。 Several types of plane use the airport and for each type, the fuel capacity and maximum range is to be recorded. 几种类型的飞机使用机场,每种类型的燃油容量和最大航程都要记录下来。

Each pilot works for only one airline. 每个飞行员只为一家航空公司工作。 For each pilot, their name, date of birth, address, the types of plane they can fly and their pilot‟s licence number is to be recorded. 对于每位飞行员,应记录其姓名,出生日期,地址,他们可以飞行的飞机类型以及其飞行员执照编号。 Further information is to be recorded to enable the production of a report listing the following details for each plane that uses the airport: Plane identification code, Plane type, Date of manufacture, Owning airline. 将记录更多信息,以生成报告,其中列出使用机场的每架飞机的以下详细信息:飞机识别码,飞机类型,制造日期,所属航空公司。

This is what I now have (After re-designing): 这是我现在拥有的(重新设计后):

The table AIRLINES should include: 航空公司的表格应包括:

ID,
Name,
Phone #

The table PLANES should include: 表格PLANES应该包括:

ID,
Date of Manufacture
Airline ID
FOREIGN KEY (Airline ID) references table AIRLINES
Plane Type ID 
FOREIGN KEY (Plane Type ID) references table PLANE TYPE

The table PLANE TYPE should include: 表PLANE TYPE应包括:

ID,
Maximum range,
Fuel capacity,

The table PILOTS should include: PILOTS表应包括:

ID,
Name,
Date of Birth,
Address,
License #,
Airline ID,
FOREIGN KEY (Airline ID) references table AIRLINES
PilotPlaneID
FOREIGN KEY (PilotPlaneID) references table PILOTPLANETYPE

The table PILOTPLANETYPE should include: 表PILOTPLANETYPE应该包括:

   PilotID
   PlaneTypeID
   FOREIGN KEY (PilotID) references table PILOT
   FOREIGN KEY (PlaneTypeID) references table PLANE TYPE

According to my marker, I had have left a many to many relationship between Pilot and Plane Type. 根据我的记号笔,我在飞行员和飞机类型之间留了很多对很多的关系。 Can someone with some database design knowledge please give me helping hand? 有数据库设计知识的人可以帮助我吗?

(EDIT: Tables now updated with PILOTPLANETYPE, which I think should satisfy the requirements)? (编辑:现在用PILOTPLANETYPE更新的表,我认为应该满足要求)?

Your design has one plane type per pilot. 您的设计中每个飞行员都有一种飞机类型。

The description contains "the types of plane they can fly". 描述包含“他们可以飞行的飞机类型”。 This plural suggests that each pilot could be flying many planes. 这个复数表明每个飞行员可能会驾驶许多飞机。

Since this is homework, I'll let you figure out how to put this information into your design. 由于这是家庭作业,因此我将让您弄清楚如何将这些信息放入您的设计中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM