# SQL test 假設有一個搶獎品活動,要建立新的後台讓設定人員使用, 請各位依下方需求,設計出 table Schema 需求: 1. 活動頁面需要「活動名稱、主視覺圖片、活動說明、搶購按鈕、活動時間」的資訊 2. 搶購時會再依「不同場次時間」設定不同的獎品及數量,讓消費者去搶 ## Table schema * 是不是常態性的活動?會不會持續發生? * 現有表單下有 `activity_promotion` 蠻像的  * is_active * member_id * modify_ts * event_detail * 使用 primary key & index * join 用最少的 * explain 不要出現 type range & key & key_len 越小越好 possible_keys * join 先用 where 過濾掉比較好 * outer default left * 開一張 activity_prize 去紀錄 prize 細節
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up