我有兩個表格當前具有相同的主鍵,我可以讓這兩個表具有相同的主鍵嗎?將具有相同主鍵的兩個表規格化爲3NF
也都在第三範式
Ticket:
-------------------
Ticket_id* PK
Flight_name* FK
Names*
Price
Tax
Number_bags
Travel class:
-------------------
Ticket id * PK
Customer_5star
Customer_normal
Customer_2star
Airmiles
Lounge_discount
ticket_economy
ticket_business
ticket_first
food allowance
drink allowance
在數據庫中的表的其餘部分中的所有表都低於
乘客:
名稱* PK Credit_card_number Credit_card_issue TICKET_ID * 地址
航班:
Flight_name * PK FLIGHT_DATE Source_airport_id * FK Dest_airport_id * FK 來源 目標 Plane_id *
機場:
Source_airport_id * PK Dest_airport_id * PK Source_airport_country Dest_airport_country
飛行員:
Pilot_name * PK 平面標識* FK Pilot_grade 月 飛行小時 率
飛機:
Plane_id * PK Pilot_name * FK
如果你真的想把它變成一個3NF的問題,你需要在你的問題中定義你的模式。此外,表格名稱並不清晰 – Drew
表格代表什麼?他們有關係嗎?數據是什麼樣的?從列名看來,你似乎需要在3NF中引入大量表格。請在問題中添加更多信息 - 目前看起來可能無法給您任何有意義的答案。 – jpw