DATABASE

DB 모델링 연습(1)

YoonJong 2024. 3. 9. 11:31
728x90

데이터베이스 요구 사항 분석 : 요구사항 이해

개념적 데이터 모델링 (ERD) :  높은 수준의 데이터 구조를 시각화 하기 위해 엔티티-관계 다이어그램 ERD 작성 

논리적 데이터 모델링 (RM - 관계모델)  : 데이터 관계 및 제약 조건을 나타내는 관계형 모델 개발

물리적 데이터 모델링 (PM - 피지컬 모델) : 특정 데이터베이스 관리 시스템에 대한 실제 데이터베이스 스키마 설계 

 

 

 

 

논리적모델링 

물리적모델링

 

MysqlWorkbench ER Diagram 을 이용해 테이블 만들기

 

 

제약조건 추가 

alter table t_customer
add constraint fk_region_code foreign key (region_code) references t_region(region_code);

alter table t_sales
add constraint fk_customer_id foreign key (customer_id) references t_customer(customer_id);

alter table t_sales
add constraint fk_product_code foreign key (product_code) references t_product(product_code);
728x90