프로젝트

일반

사용자정보

PDS 테이블 구조 » 이력 » 버전 2

버전 1 (백흠경, 2018/10/07 19:00) → 버전 2/7 (백흠경, 2018/10/07 19:15)

h1. PDS 테이블 구조

{{{{plantuml(svg) {{
@startuml
' uncomment the line below if you're using computer with a retina display
' skinparam dpi 300
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
' we use bold for primary key
' green color for unique
' and underscore for not_null
!define primary_key(x) <b>x</b>
!define unique(x) <color:green>x</color>
!define not_null(x) <u>x</u>
' other tags available:
' <i></i>
' <back:COLOR></color>, where color is a color name or html color code
' (#FFAACC)
' see: http://plantuml.com/classes.html#More
hide methods
hide stereotypes

' entities

Table(121, "121\n(모델 파일 정보를 가짐)") Table(user, "user\n(User in our system)") {
not_null(unique(dwg_file_spec)) TEXT primary_key(id) INTEGER
not_null(unique(username)) VARCHAR[32]
not_null(password) VARCHAR[64]
}

Table(122, "122") Table(session, "session\n(session for user)") {
not_null(unique(dwg_view_index_no)) primary_key(id) INTEGER
not_null(user_id) INTEGER
not_null(unique(session_id) VARCHAR[64]
}

Table(123, "123\n(모델 Index No를 가짐)") Table(user_profile, "user_profile\n(Some info of user)") {
not_null(unique(dwg_model_index_no)) primary_key(user_id) INTEGER
not_null(unique(model_file_spec)) TEXT age SMALLINT
gender SMALLINT
birthday DATETIME
}

Table(113, "113") Table(group, "group\n(group of users)") {
not_null(discipline_indx_no) primary_key(id) INTEGER
not_null(partition_no) INTEGER not_null(name) VARCHAR[32]
}

Table(12_XXX, "12_XXX\n(파이프 관련 테이블)") Table(user_group, "user_group\n(relationship of user and group)") {
}

Table(22_XXX, "22_XXX\n(Equipment 관련 테이블)") {
primary_key(user_id) INTEGER
}

Table(24_XXX, "24_XXX\n(Nozzle 관련 테이블)") {
primary_key(group_id) INTEGER
}

Table(80_XXX, "80_XXX\n(Support 관련 테이블)") {
joined_at DATETIME
}

' relationships
' one-to-one relationship
user -- user_profile : "A user only \nhas one profile"
' one to may relationship
121 user --> 122 session : "dwg_view_index_no를 구함" "A user may have\n many sessions"
' many to many relationship
' Add mark if you like
122 user "1" --> 123
123 --> 113
113 --> 12_XXX
"*" user_group : "partition_no" "A user may be \nin many groups"
113 group "1" --> 22_XXX "0..N" user_group : "partition_no"
113 --> 24_XXX : "partition_no"
113 --> 80_XXX : "partition_no"
"A group may \ncontain many users"
@enduml
}}
클립보드 이미지 추가 (최대 크기: 500 MB)