嗨我開發一個事件地點的在線預訂我的問題是在票務模塊,如果客戶預訂了兩個功能室在一張票我不知道我的數據庫,如果它是正常化我只想成爲當然請留下數據庫改進意見正常化的預訂數據庫
create table RESERVATIONS (
PK reservation_id
lname,
fname,
contact,
email,
date,
timeStart,
timeEnd
numGuest,
total)
create table FUNCTIONROOMS (
PK function_id,
FK functionroom_id,
FK reservation_id)
create table FUNCTIONROOMDETAILS(
PK functionroom_id,
functionName,
functionPrice,
functionStatus)
即時計劃這個查詢是我的數據庫規範化?或不是
select functionRoom.functionRoom_id
from reservations, functionRoom
where reservation.reservation_id = functionRoom.reservation_id
and reservation_id = 'reservation_id'
規範化與預期查詢無關;有幾種形式的正常化; 'RESERVATIONS'似乎沒有'reservation_id'列。哦,你應該接受一些答案。 – 2012-02-26 07:41:43
謝謝我忘了添加reservation_id,但它已經更新了我的帖子:), – Led 2012-02-26 07:52:57
桌子上的PRIMARY鍵是什麼?表格之間有什麼關係('FOREIGN'鍵)?這些表格代表什麼?表示客房,客戶,活動(您在問題中提到的)的表格在哪裏? – 2012-02-26 08:40:57