My Travle Map

ERD 그리기

오선지♬ 2023. 8. 17. 23:17
728x90
반응형

FK를 실제로 쓰진 않았고, 논리적으로 이렇게 구현한다고 보기위해 ERD에 작성.

 

 

QuickDBD-export.pdf
0.08MB

 

 

 

 

 

T_USER as u
--
USER_CD PK varchar(20)
USER_ID UNIQUE varchar(50)
USER_PWD  varchar(150)
USER_NAME  varchar(20) NULL
TEL_NO  varchar(200) NULL
HP_NO  varchar(200) NULL
USE_YN  tinyint(1) default=1
INS_DT datatime default=CURRENT_TIMESTAMP
UPD_DT datatime default=CURRENT_TIMESTAMP

T_MAP as m
--
MAP_CD PK varchar(10)
UP_MAP_CD varchar(10)
MAP_KOR_NM varchar(40) NULL
MAP_ENG_NM varchar(40) NULL

T_MAP_COL as mc
--
MAP_CD PK varchar(10) FK >- T_MAP.MAP_CD
USER_CD PK varchar(20) FK >- T_USER.USER_CD
MAP_COL varchar(7) default='#000000'
INS_DT datatime default=CURRENT_TIMESTAMP
UPD_DT datatime default=CURRENT_TIMESTAMP

T_MAP_BD as md
--
BD_CD PK varchar(20)
MAP_CD varchar(10) FK >- T_MAP.MAP_CD
USER_CD varchar(20) FK >- T_USER.USER_CD
BD_TITLE varchar(3000) NULL
BD_BODY text NULL
HIT smallint  default=0
USE_YN tinyint(1)  default=1
INS_DT datatime default=CURRENT_TIMESTAMP
UPD_DT datatime default=CURRENT_TIMESTAMP

T_BD_IMG as bi
--
IMG_CD PK varchar(20)
BD_CD varchar(20) FK >- T_MAP_BD.BD_CD
IMG_NM varchar(300)
IMG_EXT varchar(10) NULL
IMG_SIZE int  default=0
IMG_PATH  varchar(300)
USER_CD varchar(20)
USE_YN tinyint(1)  default=1
INS_DT datatime default=CURRENT_TIMESTAMP
UPD_DT datatime default=CURRENT_TIMESTAMP

T_BD_COMMENT as bc
--
CMT_CD PK varchar(20)
BD_CD varchar(20) FK >- T_MAP_BD.BD_CD
CMT_GRP_CD varchar(20)
CMT_LVL_NO smallint default=0
CMT_SORT_NO smallint default=0
COMMENT varchar(10000) NULL
USER_CD varchar(20)
USE_YN tinyint(1) default=1
INS_DT datatime default=CURRENT_TIMESTAMP
UPD_DT datatime default=CURRENT_TIMESTAMP

 

 

 

무료 ERD 프로그램

https://www.quickdatabasediagrams.com/

 

QuickDatabaseDiagrams.com

Pretty diagrams make your documents look good and help you communicate clearly.

www.quickdatabasediagrams.com

 

728x90
반응형