본문으로 건너뛰기

ER 다이어그램

샘플 데이터 테이블 간의 관계를 설명합니다.

핵심 관계

테이블카탈로그·스키마비고
customers · accounts · credit_assessmentssourcedb.public
transactions · merchants · fraud_labels · productsiceberg.cardproducts 는 독립 테이블 (카드 상품 카탈로그)
consultations · marketing_consents · customer_segmentscard_crm.public
app_eventscard_log.public

customerstransactions서로 다른 카탈로그를 잇는 Federation JOIN 이다.

주요 컬럼

customers

customer_id (PK, UUID), name, resident_number (PII), phone (PII), email, address, birth_date, gender, credit_score, annual_income, customer_grade (VIP/Gold/Silver/Bronze), joined_at, is_active

transactions

txn_id (PK, UUID), customer_id (FK), merchant_id (FK), card_number (PII), txn_datetime, amount, currency (KRW), txn_type, channel (online/offline/atm/mobile), status (approved/declined/pending), mcc_code, country, ip_address, device_id

fraud_labels

fraud_id (PK, UUID), txn_id (FK), is_fraud, fraud_type (stolen_card/account_takeover/friendly_fraud/merchant_fraud), confidence_score, detected_at, reported_by, investigation_status

merchants

merchant_id (PK, UUID), name, business_number, mcc_code, category, city, region, registered_at, risk_score, is_active

products

product_id (PK), name, card_type (credit/debit), annual_fee, cashback_rate, interest_rate, min_credit_score, launched_at, is_active

Federation JOIN 포인트

샘플 데이터의 핵심 가치는 cross-catalog JOIN입니다. customers(sourcedb)와 transactions(iceberg)를 customer_id로 조인하여 Federation SQL을 시연합니다.