本文介绍了规范化 - SQL - 3NF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一个 SQL 数据库,它需要是一个五表数据库才能满足 Air-Crewe 的要求.到目前为止,我有以下几点:

我为 UNF 准备了这个:

CrewID、Crew Type、Title、Forename、Surname、Gender、CAALicenceNum、FlightID、FlightNum、IATADep、IARAArr、Date、SchDep、SchArr、Comments、A/CType、A/CReg、A/CManuf

I have this for UNF:

CrewID, Crew Type, Title, Forename, Surname, Gender, CAALicenceNum, FlightID, FlightNum, IATADep, IARAArr, Date, SchDep,SchArr, Comments, A/CType, A/CReg, A/CManuf

我有这个用于 1NF:

TBLCrew(CrewID[PrimaryKey]、CrewType、CrewTitle、Forename、Surname、gender、CAALicenceNum、FlightID*)

I have this for 1NF:

TBLCrew(CrewID[PrimaryKey], CrewType, CrewTitle, Forename, Surname, gender, CAALicenceNum, FlightID*)

TBLFlight(FlightID[PrimaryKey], FlightNumber, IATADep, IATAArr, Date, SchArr, comments, A/CType, A/CReg, A/CManuf)

TBLFlight(FlightID[PrimaryKey], FlightNumber, IATADep, IATAArr, Date, SchArr, comments, A/CType, A/CReg, A/CManuf)

我有这个用于 2NF:

TBLCrew(CrewID[PrimaryKey]、CrewType、CreweTitle、Forename、Surname、gender、CAALicenceNum)

I have this for 2NF:

TBLCrew(CrewID[PrimaryKey], CrewType, CreweTitle, Forename, Surname, gender, CAALicenceNum)

TBLFlight(FlightID[PrimaryKey], FlightNum, IATADep, IATAArr, Date, SchArr, comments, A/CType, A/CReg, A/CManuf)

TBLFlight(FlightID[PrimaryKey], FlightNum, IATADep, IATAArr, Date, SchArr, comments, A/CType, A/CReg, A/CManuf)

TBLCrewFlight(CreweID[composite/compoundKey], FlightID[composite/compoundKey])

TBLCrewFlight(CreweID[composite/compoundKey], FlightID[composite/compoundKey])

需要将 3NF 分成五个表,但我不知道如何实现这一点 - 任何人都可以帮助我吗?或者纠正我,如果我在上面的规范化中犯了错误(我是规范化的新手,你可能会说)

推荐答案

接受的答案可以有更多的飞机进行一次飞行,我认为这是不正确的.

Accepted answer can have more Aircrafts for a flight, I do not think that is correct.

TBLCrew(CrewID[PrimaryKey], CrewType, CreweTitle, Forename, Surname, gender, CAALicenceNum)

TBLFlight(FlightNum[PrimaryKey], IATADep, IATAArr, Date, SchArr, A/CReg[composite/compoundKey])

TBLCrewFlight(CreweID[composite/compoundKey], FlightNum[composite/compoundKey], Comments)

Aircraft(A/CReg[PrimaryKey], A/CType[composite/compoundKey])

TBL_A/CType(A/CType[PrimaryKey], A/C Manuf)

这篇关于规范化 - SQL - 3NF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-03 21:59