私は MySQL を初めて使用し、MySQL を使用して注文システムに基づくプロジェクトに取り組んでいます。
私が持っているのは、次のテーブルです。
Session Table:
PK Session_ID
Date: Session_Date
Delivery Table:
PK: Delivery_Type (eg. Firstclass, Secondclass)
Int: Delivery_TimeToDeliver (1, 2, 3, these represent the expected time to deliver)
Order Table:
PK: Order_ID: autonum + 1
FK: Delivery Type
Date: Delivery_EstimatedTime
注文を追加してやりたいことは、セッション ID に基づいて推定時間を計算することです。基本的には次のとおりです。
Delivery_EstimatedTime = (Session Date + Delivery_TimeToDeliver)
これについて最善の方法は何ですか?
レコードの挿入先でそれを行うことはできますか?