users 통합

테이블 (7)

common_codes

  • code_id (PK) — VARCHAR(30) — 기본 키 — NOT NULL
  • code_group — VARCHAR(30) — NOT NULL — 코드의
  • code_name — VARCHAR(100) — NOT NULL — 코드가
  • description — TEXT — 코드에

poll_options

  • option_id (PK) — SERIAL — 기본 키 — NOT NULL
  • option_text — TEXT — NOT NULL — 선택지
  • poll_id (FK) — SERIAL — 외래 키 → polls.poll_id — NOT NULL

polls

  • poll_id (PK) — SERIAL — 기본 키 — NOT NULL
  • poll_title — TEXT — NOT NULL — 설문

profile_options

  • option_code (PK2) — INT — 기본 키 — NOT NULL
  • question_id (PK1) — VARCHAR(20) — 외래 키 → profile_questions.question_id — NOT NULL
  • option_text — TEXT — NOT NULL — 선택지

profile_questions

  • question_id (PK) — VARCHAR(20) — 기본 키 — NOT NULL
  • question_text — TEXT — NOT NULL — 질문
  • question_type — VARCHAR(20) — NOT NULL — 질문

user_poll_responses

  • response_id (PK) — SERIAL — 기본 키 — NOT NULL
  • chosen_option_id — INT — NOT NULL — 사용자가
  • user_sn (FK1) — VARCHAR(225) — 외래 키 → users.user_sn — NOT NULL
  • poll_id (FK2) — SERIAL — 외래 키 → polls.poll_id — NOT NULL

users

  • user_sn (PK) — VARCHAR(225) — 기본 키 — NOT NULL
  • region_code — VARCHAR(30)
  • birth_date — DATE
  • gender — VARCHAR(10)
  • job_code — VARCHAR(50)
  • marital_status_code — INT — Q1.
  • children_count — INT — Q2.
  • family_size_code — INT — Q3.
  • education_code — INT — Q4.
  • job_type_code — INT — Q5.
  • code_id (FK) — VARCHAR(30) — 외래 키 → common_codes.code_id — NOT NULL