본문 바로가기
DATABASE

DB 모델링 연습(1)

by YoonJong 2024. 3. 9.
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

'DATABASE' 카테고리의 다른 글

DB 모델링 연습(2)  (0) 2024.03.09
키(Key) 의 종류에 대해 알아보자  (0) 2023.02.19
릴레이션(테이블)의 특징 4가지  (0) 2023.02.15
Centos mysql 비밀번호 재설정 방법  (0) 2023.01.13
ec2 linux mysql8 설치하기  (0) 2023.01.12

댓글