0819仕様書無しさん
2023/02/26(日) 19:22:28.85【データベースの設計】
受注情報を管理するためのデータベースを設計します。以下のようなテーブルを作成します。
【テーブル1:Orders】
OrderID (int, primary key):受注ID
CustomerID (int):顧客ID
OrderDate (datetime):受注日時
TotalAmount (decimal):受注合計金額
Status (int):受注ステータス(1: 新規, 2: 処理中, 3: 出荷済み)
【テーブル2:OrderDetails】
OrderDetailID (int, primary key):受注明細ID
OrderID (int):受注ID
ProductID (int):商品ID
Quantity (int):数量
UnitPrice (decimal):単価