erd_test

Tables (6)

account_table (Untitled3)

  • 계좌번호 (account_number) — int — Primary key — NOT NULL
  • 종류 (account_type) — int
  • 잔고 (balance) — int
  • 상태 (account_status) — int
  • 시작일 (start_date) — DATE
  • 종료일 (end_date) — DATE
  • 사용자id (customer_id) — VARCHAR(40) — Foreign key → customer.사용자id — NOT NULL

customer (Untitled)

  • 사용자id (customer_id) — VARCHAR(40) — Primary key — NOT NULL
  • 이름 (c_name) — VARCHAR(10)
  • 주민번호 (ssn) — int
  • 주소 (addr) — VARCHAR(50)
  • 전화번호 (phone) — int

customer (Untitled4)

  • 사용자 id (userid) — VARCHAR — Primary key — NOT NULL
  • 사용자 이름 (name) — VARCHAR
  • 전화번호 (phone) — int
  • 주소 (addr) — VARCHAR
  • 가입날짜 (insertdate) — DATE
  • 업데이트날짜 (updatedate) — DATE
  • 삭제날짜 (deletedate) — DATE

product (Untitled6)

  • 상품id (productid) — int — Primary key — NOT NULL
  • 상품이름 (pname) — VARCHAR
  • 상품갯수 (pstock) — int
  • 가격 (pprice) — int
  • 등록일 (insertdate) — DATE
  • 업데이트일 (updatedate) — DATE
  • 삭제일 (deletedate) — DATE

purchase (Untitled5)

  • 구매번호 (seq) — int — Primary key — NOT NULL
  • 구매날짜 (purchasedate) — DATE
  • 구매갯수 (qty) — int
  • 사용자 id (userid) — VARCHAR — Foreign key → customer.사용자 id — NOT NULL
  • 상품id (productid) — int — Foreign key → product.상품id — NOT NULL

trade (Untitled2)

  • 일련번호 (transaction_id) — int — Primary key — NOT NULL
  • 일시 (transaction_date) — DATE
  • 고객관리번호 (customer_id) — int
  • 내역 (trade_history) — VARCHAR(50)
  • 입출금구분 (dw_type) — INT
  • 거래금액 (transaction_amount) — INT
  • 잔액 (balance) — INT
  • 계좌번호 (account_number) — int — Foreign key → account_table.계좌번호 — NOT NULL