Open SYChoi opened 3 years ago
We have to build schema as ERD wrote by @helltime .
ERD site : https://ondras.zarovi.cz/sql/demo/?keyword=default
<?xml version="1.0" encoding="UTF-8"?> <!-- SQL XML created by WWW SQL Designer, https://github.com/ondras/wwwsqldesigner/ --> <!-- Active URL: https://ondras.zarovi.cz/sql/demo/?keyword=default --> -<sql> -<datatypes db="mysql"> -<group color="rgb(238,238,170)" label="Numeric"> <type label="Integer" quote="" sql="INTEGER" length="0"/> <type label="TINYINT" quote="" sql="TINYINT" length="0"/> <type label="SMALLINT" quote="" sql="SMALLINT" length="0"/> <type label="MEDIUMINT" quote="" sql="MEDIUMINT" length="0"/> <type label="INT" quote="" sql="INT" length="0"/> <type label="BIGINT" quote="" sql="BIGINT" length="0"/> <type label="Decimal" quote="" sql="DECIMAL" length="1" re="DEC"/> <type label="Single precision" quote="" sql="FLOAT" length="0"/> <type label="Double precision" quote="" sql="DOUBLE" length="0" re="DOUBLE"/> </group> -<group color="rgb(255,200,200)" label="Character"> <type label="Char" quote="'" sql="CHAR" length="1"/> <type label="Varchar" quote="'" sql="VARCHAR" length="1"/> <type label="Text" quote="'" sql="MEDIUMTEXT" length="0" re="TEXT"/> <type label="Binary" quote="'" sql="BINARY" length="1"/> <type label="Varbinary" quote="'" sql="VARBINARY" length="1"/> <type label="BLOB" quote="'" sql="BLOB" length="0" re="BLOB"/> </group> -<group color="rgb(200,255,200)" label="Date & Time"> <type label="Date" quote="'" sql="DATE" length="0"/> <type label="Time" quote="'" sql="TIME" length="0"/> <type label="Datetime" quote="'" sql="DATETIME" length="0"/> <type label="Year" quote="" sql="YEAR" length="0"/> <type label="Timestamp" quote="'" sql="TIMESTAMP" length="0"/> </group> -<group color="rgb(200,200,255)" label="Miscellaneous"> <type label="ENUM" quote="" sql="ENUM" length="1"/> <type label="SET" quote="" sql="SET" length="1"/> <type label="Bit" quote="" sql="bit" length="0"/> </group> </datatypes> -<table name="notice" y="65" x="19"> -<row name="N_ID" autoincrement="1" null="0"> <datatype>INTEGER(1)</datatype> <comment>N_SEQ_PK</comment> </row> -<row name="NOTICE_TYPE" autoincrement="0" null="0"> <datatype>VARCHAR(2)</datatype> <comment>공지사항 타입</comment> </row> -<row name="TITLE" autoincrement="0" null="1"> <datatype>VARCHAR(150)</datatype> <default>NULL</default> <comment>제목</comment> </row> -<row name="CONTENT" autoincrement="0" null="1"> <datatype>VARCHAR(4000)</datatype> <default>NULL</default> <comment>내용</comment> </row> -<row name="REG_USER_ID" autoincrement="0" null="0"> <datatype>VARCHAR(50)</datatype> <comment>등록자아이디</comment> </row> -<row name="REG_DATE" autoincrement="0" null="0"> <datatype>DATETIME</datatype> <comment>등록일시</comment> </row> -<key name="" type="PRIMARY"> <part>N_ID</part> </key> <comment>공지사항</comment> </table> -<table name="front_freeboard" y="71" x="421"> -<row name="FFB_ID" autoincrement="1" null="0"> <datatype>INTEGER(1)</datatype> <comment>FFB_SEQ_PK</comment> </row> -<row name="TITLE" autoincrement="0" null="1"> <datatype>VARCHAR(150)</datatype> <default>NULL</default> <comment>제목</comment> </row> -<row name="CONTENT" autoincrement="0" null="1"> <datatype>VARCHAR(4000)</datatype> <default>NULL</default> <comment>내용</comment> </row> -<row name="REG_USER_ID" autoincrement="0" null="0"> <datatype>VARCHAR(50)</datatype> <comment>등록자아이디</comment> </row> -<row name="REG_DATE" autoincrement="0" null="0"> <datatype>DATETIME</datatype> <comment>등록일시</comment> </row> -<key name="" type="PRIMARY"> <part>FFB_ID</part> </key> <comment>프론트엔드 자유게시판 메인</comment> </table> -<table name="front_freeboard_like" y="64" x="730"> -<row name="FFBL_ID" autoincrement="1" null="0"> <datatype>INTEGER(1)</datatype> <comment>FFBL_SEQ_PK</comment> </row> -<row name="LIKE_TYPE" autoincrement="0" null="0"> <datatype>VARCHAR(2)</datatype> <comment>좋아요구분</comment> </row> -<row name="REG_USER_ID" autoincrement="0" null="0"> <datatype>VARCHAR(50)</datatype> <comment>등록자아이디</comment> </row> -<row name="REG_DATE" autoincrement="0" null="0"> <datatype>DATETIME</datatype> <comment>등록일시</comment> </row> -<row name="FFB_ID" autoincrement="0" null="0"> <datatype>INTEGER(1)</datatype> <relation row="FFB_ID" table="front_freeboard"/> <comment>FFB_FK</comment> </row> -<key name="" type="PRIMARY"> <part>FFBL_ID</part> </key> <comment>프론트엔드 좋아요</comment> </table> -<table name="front_freeboard_comment" y="247" x="725"> -<row name="FFBC_ID" autoincrement="1" null="0"> <datatype>INTEGER(1)</datatype> <comment>FFBC_SEQ_PK</comment> </row> -<row name="PARENT_ID" autoincrement="0" null="1"> <datatype>INTEGER(1)</datatype> <default>NULL</default> <comment>상위아이디</comment> </row> -<row name="COMMENT" autoincrement="0" null="1"> <datatype>VARCHAR(1000)</datatype> <default>NULL</default> <comment>댓글내용</comment> </row> -<row name="REG_USER_ID" autoincrement="0" null="0"> <datatype>VARCHAR(50)</datatype> <comment>등록자아이디</comment> </row> -<row name="REG_DATE" autoincrement="0" null="0"> <datatype>DATETIME</datatype> <comment>등록일시</comment> </row> -<row name="FFB_ID" autoincrement="0" null="0"> <datatype>INTEGER(1)</datatype> <relation row="FFB_ID" table="front_freeboard"/> <comment>FFB_FK</comment> </row> -<key name="" type="PRIMARY"> <part>FFBC_ID</part> </key> <comment>프론트엔드 자유게시판 댓글</comment> </table> -<table name="front_curriculum" y="517" x="419"> -<row name="FC_ID" autoincrement="1" null="0"> <datatype>INTEGER(1)</datatype> <comment>FC_SEQ_PK</comment> </row> -<row name="TITLE" autoincrement="0" null="1"> <datatype>VARCHAR(150)</datatype> <default>NULL</default> <comment>제목</comment> </row> -<row name="CONTENT" autoincrement="0" null="1"> <datatype>VARBINARY(4000)</datatype> <default>NULL</default> <comment>내용</comment> </row> -<row name="REG_USER_ID" autoincrement="0" null="0"> <datatype>VARCHAR(50)</datatype> <comment>등록자아이디</comment> </row> -<row name="REG_DATE" autoincrement="0" null="0"> <datatype>DATETIME</datatype> <comment>등록일시</comment> </row> -<key name="" type="PRIMARY"> <part>FC_ID</part> </key> <comment>프론트엔드 커리큘럼 메인</comment> </table> -<table name="front_curriculum_youtube" y="513" x="723"> -<row name="FCU_ID" autoincrement="1" null="0"> <datatype>INTEGER(1)</datatype> <comment>FCU_SEQ_PK</comment> </row> -<row name="TITLE" autoincrement="0" null="1"> <datatype>VARCHAR(150)</datatype> <default>NULL</default> <comment>제목</comment> </row> -<row name="LINK_URL" autoincrement="0" null="0"> <datatype>VARCHAR(1000)</datatype> <comment>URL</comment> </row> -<row name="SUMMARY" autoincrement="0" null="1"> <datatype>VARCHAR(4000)</datatype> <default>NULL</default> <comment>영상내용</comment> </row> -<row name="REG_USER_ID" autoincrement="0" null="0"> <datatype>VARCHAR(50)</datatype> <comment>등록자아이디</comment> </row> -<row name="REG_DATE" autoincrement="0" null="0"> <datatype>DATETIME</datatype> <comment>등록일시</comment> </row> -<row name="SORT_ORDER" autoincrement="0" null="0"> <datatype>VARCHAR(2)</datatype> <comment>정렬순서</comment> </row> -<row name="FC_ID" autoincrement="0" null="0"> <datatype>INTEGER(1)</datatype> <relation row="FC_ID" table="front_curriculum"/> <comment>FC_FK</comment> </row> -<key name="" type="PRIMARY"> <part>FCU_ID</part> </key> <comment>프론트엔드 커리큘럼 유튜브 링크</comment> </table> -<table name="front_curriculum_comment" y="755" x="713"> -<row name="FCC_ID" autoincrement="1" null="0"> <datatype>INTEGER(1)</datatype> <comment>FCC_SEQ_PK</comment> </row> -<row name="PARENT_ID" autoincrement="0" null="1"> <datatype>INTEGER(1)</datatype> <default>NULL</default> <comment>상위아이디</comment> </row> -<row name="COMMENT" autoincrement="0" null="1"> <datatype>VARCHAR(1000)</datatype> <default>NULL</default> <comment>댓글내용</comment> </row> -<row name="REG_USER_ID" autoincrement="0" null="0"> <datatype>VARCHAR(50)</datatype> <comment>등록자아이디</comment> </row> -<row name="REG_DATE" autoincrement="0" null="0"> <datatype>DATETIME</datatype> <comment>등록일시</comment> </row> -<row name="FC_ID" autoincrement="0" null="0"> <datatype>INTEGER(1)</datatype> <relation row="FC_ID" table="front_curriculum"/> <comment>FC_FK</comment> </row> -<key name="" type="PRIMARY"> <part>FCC_ID</part> </key> <comment>프론트엔드 커리큘럼 댓글</comment> </table> -<table name="front_curriculum_like" y="965" x="716"> -<row name="FCL_ID" autoincrement="1" null="0"> <datatype>INTEGER(1)</datatype> <comment>FCL_SEQ_PK</comment> </row> -<row name="LIKE_TYPE" autoincrement="0" null="0"> <datatype>VARCHAR(2)</datatype> <comment>좋아요구분</comment> </row> -<row name="REG_USER_ID" autoincrement="0" null="0"> <datatype>VARCHAR(50)</datatype> <comment>등록자아이디</comment> </row> -<row name="REG_DATE" autoincrement="0" null="0"> <datatype>DATETIME</datatype> <comment>등록일시</comment> </row> -<row name="FC_ID" autoincrement="0" null="0"> <datatype>INTEGER(1)</datatype> <relation row="FC_ID" table="front_curriculum"/> <comment>FC_FK</comment> </row> -<key name="" type="PRIMARY"> <part>FCL_ID</part> </key> <comment>프론트엔드 커리큘럼 좋아요</comment> </table> -<table name="USER_INFO" y="64" x="159"> -<row name="USER_ID" autoincrement="0" null="0"> <datatype>VARCHAR(50)</datatype> <comment>사용자아이디</comment> </row> -<row name="USER_PWD" autoincrement="0" null="0"> <datatype>VARCHAR(100)</datatype> <comment>사용자패스워드</comment> </row> -<row name="EMAIL" autoincrement="0" null="0"> <datatype>VARCHAR(100)</datatype> <comment>사용자이메일</comment> </row> -<row name="LOGIN_TOKEN" autoincrement="0" null="1"> <datatype>VARCHAR(200)</datatype> <default>NULL</default> <comment>로그인토큰</comment> </row> -<row name="GITHUB_MAIL" autoincrement="0" null="1"> <datatype>VARCHAR(100)</datatype> <default>NULL</default> <comment>깃허브연동이메일</comment> </row> -<row name="GITHUB_LOGIN_TOKEN" autoincrement="0" null="1"> <datatype>VARCHAR(200)</datatype> <default>NULL</default> <comment>깃허브SSO토큰</comment> </row> -<row name="YOUTUBE_MAIL" autoincrement="0" null="1"> <datatype>VARCHAR(100)</datatype> <default>NULL</default> <comment>유튜부연동이메일</comment> </row> -<row name="YOUTUBE_LOGIN_TOKEN" autoincrement="0" null="1"> <datatype>VARCHAR(200)</datatype> <default>NULL</default> <comment>유튜브SSO토큰</comment> </row> -<row name="KAKAO_MAIL" autoincrement="0" null="1"> <datatype>VARCHAR(100)</datatype> <default>NULL</default> <comment>카카오톡연동이메일</comment> </row> -<row name="KAKAO_LOGIN_TOKEN" autoincrement="0" null="1"> <datatype>VARCHAR(200)</datatype> <default>NULL</default> <comment>카카오톡SSO토큰</comment> </row> -<row name="GOOGLE_MAIL" autoincrement="0" null="1"> <datatype>MEDIUMTEXT(100)</datatype> <default>NULL</default> <comment>구글연동이메일</comment> </row> -<row name="GOOGLE_LOGIN_TOKEN" autoincrement="0" null="1"> <datatype>VARCHAR(200)</datatype> <default>NULL</default> <comment>구글SSO토큰</comment> </row> -<row name="PWD_QUEST_TYPE" autoincrement="0" null="0"> <datatype>VARCHAR(2)</datatype> <comment>비밀번호찾기질문유형</comment> </row> -<row name="PWD_ANSWER" autoincrement="0" null="0"> <datatype>VARCHAR(200)</datatype> <comment>비밀번호찾기대답</comment> </row> -<row name="INTEREST_FRONT" autoincrement="0" null="1"> <datatype>VARCHAR(1)</datatype> <default>NULL</default> <comment>관심분야_프론트엔드</comment> </row> -<row name="INTEREST_BACK" autoincrement="0" null="1"> <datatype>VARCHAR(1)</datatype> <default>NULL</default> <comment>관심분야_백엔드</comment> </row> -<row name="INTEREST_DEVPOS" autoincrement="0" null="1"> <datatype>VARCHAR(1)</datatype> <default>NULL</default> <comment>관심분야_데브옵스</comment> </row> -<row name="TOS_YN" autoincrement="0" null="0"> <datatype>VARCHAR(1)</datatype> <comment>서비스이용약관동의여부</comment> </row> -<row name="PP_YN" autoincrement="0" null="0"> <datatype>VARCHAR(1)</datatype> <comment>개인정보처리방침동의여부</comment> </row> -<row name="REG_DATE" autoincrement="0" null="0"> <datatype>DATETIME</datatype> <comment>등록일시</comment> </row> -<row name="UPD_DATE" autoincrement="0" null="1"> <datatype>DATETIME</datatype> <default>NULL</default> <comment>수정일시</comment> </row> -<key name="" type="PRIMARY"> <part>USER_ID</part> </key> <comment>사용자 정보</comment> </table> -<table name="common_upload_sub" y="1057" x="396"> -<row name="CUS_ID" autoincrement="1" null="0"> <datatype>VARCHAR(12)</datatype> <relation row="CUM_ID" table="common_upload_mst"/> <comment>CUS_SEQ_PK</comment> </row> -<row name="CUS_SEQ" autoincrement="0" null="1"> <datatype>INTEGER(1)</datatype> <default>NULL</default> <comment>일련번호</comment> </row> -<row name="FILE_NAME" autoincrement="0" null="0"> <datatype>VARCHAR(200)</datatype> <comment>파일명</comment> </row> -<row name="FILE_PATH" autoincrement="0" null="0"> <datatype>VARCHAR(200)</datatype> <comment>파일경로</comment> </row> -<row name="FILE_NAME_UUID" autoincrement="0" null="0"> <datatype>INTEGER(250)</datatype> <comment>파일명_UUID</comment> </row> -<row name="REG_USER_ID" autoincrement="0" null="0"> <datatype>VARCHAR(50)</datatype> <comment>등록자아이디</comment> </row> -<row name="REG_DATE" autoincrement="0" null="0"> <datatype>DATETIME</datatype> <comment>등록일시</comment> </row> -<key name="" type="PRIMARY"> <part>CUS_ID</part> </key> <comment>공통 파일업로드 서브</comment> </table> -<table name="common_upload_mst" y="1057" x="68"> -<row name="CUM_ID" autoincrement="0" null="0"> <datatype>VARCHAR(12)</datatype> <comment>게시판형식/게시글아이디</comment> </row> -<row name="REG_USER_ID" autoincrement="0" null="0"> <datatype>VARCHAR(50)</datatype> <comment>등록자아이디</comment> </row> -<row name="REG_DATE" autoincrement="0" null="0"> <datatype>DATETIME</datatype> <comment>등록일시</comment> </row> -<key name="" type="PRIMARY"> <part>CUM_ID</part> </key> <comment>공통 업로드 마스터</comment> </table> -<table name="front_qa" y="56" x="1005"> -<row name="FA_ID" autoincrement="1" null="0"> <datatype>INTEGER</datatype> <comment>FA_SEQ_PK</comment> </row> -<row name="PARENT_ID" autoincrement="0" null="1"> <datatype>INTEGER(1)</datatype> <default>NULL</default> <comment>상위아이디</comment> </row> -<row name="TITLE" autoincrement="0" null="1"> <datatype>VARCHAR(150)</datatype> <default>NULL</default> <comment>제목</comment> </row> -<row name="CONTENT" autoincrement="0" null="1"> <datatype>VARCHAR(4000)</datatype> <default>NULL</default> <comment>내용</comment> </row> -<row name="REG_USER_ID" autoincrement="0" null="0"> <datatype>VARCHAR(50)</datatype> <comment>등록자아이디</comment> </row> -<row name="REG_DATE" autoincrement="0" null="0"> <datatype>DATETIME</datatype> <comment>등록일시</comment> </row> -<key name="" type="PRIMARY"> <part>FA_ID</part> </key> <comment>질답 게시판</comment> </table> </sql>
Now, we are writing DB schema. This is the starting point of Backend development.
We have to build schema as ERD wrote by @helltime .
ERD site : https://ondras.zarovi.cz/sql/demo/?keyword=default