ERD_ShoppingMal
테이블 (12)
Address
- address_id — int — 기본 키 — NOT NULL
- user_id — int — 외래 키 → users.user_id — NOT NULL — 아이디
- address_name — varchar(50) — NOT NULL
Categories
- CategoryID — INT — 기본 키 — NOT NULL
- CategoryName — varchar(50) — NOT NULL
OrderDetails
- 주문 상세 아이디 (order_detail_id) — int — 기본 키 — NOT NULL
- 수량 (quantity) — int — NOT NULL
- 가격 (unit_cost) — decimal(15) — NOT NULL
- 상품 아이디 (ProductID) — INT — 외래 키 → Products.ProductID — NOT NULL
- 주문 아이디 (order_id) — int — 외래 키 → Orders.OrderID — NOT NULL
Orders
- OrderID (order_id) — int — 기본 키 — NOT NULL
- 주문 자 (user_id) — int — 외래 키 → users.user_id — NOT NULL — 아이디
- 주문 날짜 (order_date) — Datetime — NOT NULL
- 배송 날짜 (ship_date) — Datetime — NOT NULL
- 받는 주소 (order_address) — varchar(50) — NOT NULL
- 받는 사람 (order_receiver_name) — varchar(20) — NOT NULL
ProductCategory
- ProductID — INT — 외래 키 → Products.ProductID — NOT NULL
- CategoryID — INT — 외래 키 → Categories.CategoryID — NOT NULL
Products
- ProductID — INT — 기본 키 — NOT NULL
- 상품 번호 (product_number) — nvarchar(10) — NOT NULL
- 상품 이름 (product_name) — nvarchar(120) — NOT NULL
- 상품 가격 (unit_cost) — decimal(15) — NOT NULL
- 상품 내용 (description) — text — NOT NULL
- 재고 (product_inventory) — int — NOT NULL
- 상품 등록일 (product_created_at) — datetime — NOT NULL
Reviews
- ReviewID — int — 기본 키 — NOT NULL
- Rating — int — NOT NULL
- Comments — text — NOT NULL
- ProductID — INT — 외래 키 → Products.ProductID
- user_id — int — 외래 키 → users.user_id — NOT NULL — 아이디
ShoppingCart
- RecordID — int — 기본 키 — NOT NULL
- CartID — nvarchar(150) — NOT NULL
- Quantity — int — NOT NULL
- DateCreateed — Datetime — NOT NULL
- ProductID — INT — 외래 키 → Products.ProductID — NOT NULL
image (Image)
- image_id — int — 기본 키 — NOT NULL
- ProductID — INT — 외래 키 → Products.ProductID — NOT NULL
- image_path — varchar(50) — NOT NULL
- image_created_at — datetime — NOT NULL
point_history
- point_histroy_id (point_history_id) — int — 기본 키 — NOT NULL
- date — DATE — NOT NULL
- type — INTEGER — NOT NULL
- detail — VARCHAR(100) — NOT NULL
- used_points — DATE — NOT NULL
- points_detail — INTEGER — NOT NULL
- remaining_points — integer — NOT NULL
- user_id — int — 외래 키 → users.user_id — NOT NULL — 아이디
users
- user_id — int — 기본 키 — NOT NULL — 아이디
- user_input_id — varchar(50) — NOT NULL
- user_name — varchar(50) — NOT NULL — 이름
- user_password — varchar(200) — NOT NULL — mysql password 사용
- user_birth — varchar(8) — NOT NULL — 생년월일 : 19840503
- user_auth — varchar(10) — NOT NULL — 권한: ROLE_ADMIN,ROLE_USER
- user_point — int — NOT NULL — default : 1000000
- created_at — datetime — NOT NULL — 가입일자
- latest_login_at — datetime — 마지막 로그인 일자
결제 (payment)
- paymentId (payment_id) — INT — 기본 키 — NOT NULL
- OrderID (order_id) — int — 외래 키 → Orders.OrderID — NOT NULL
- user_id — int — 외래 키 → users.user_id — NOT NULL — 아이디
- Field