Updates physical data model #2

This commit is contained in:
Fred Z 2018-07-31 15:51:03 +02:00
parent 1c17468fb2
commit a900bca119
2 changed files with 2 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

@ -14,13 +14,11 @@ skinparam class {
!define rel(a,b,c,d,e) a c e
!define pyk(n,t="MEDIUMINT NOT NULL UNSIGNED") <font color="red">PK:<b>n</b> <size:09>[t]</size></font>
!define fnk(n,r,t="MEDIUMINT NOT NULL UNSIGNED") <font color="blue">FK:<b>n</b> <size:09>[t]</size></font>
!define pfk(n,r,t="MEDIUMINT NOT NULL UNSIGNED") <font color="orangered">PFK:<b>n</b> <size:09>[t]</size></font>
!define att(n,u,s) {field} <b>n</b> [s]
/' = = = = = = = CLASSE = = = = = = = '/
class product
class category
class prod_category <<assoc>>
/' = = = = = = = RELATION = = = = = = = '/
rel(product,1..,--,1..*,category)
@ -28,28 +26,20 @@ rel(product,1..,--,1..*,category)
/' = = = = = = = KEY = = = = = = = '/
class product {
pyk(id)
fnk(substitute_id,product.id)
..
}
class category {
pyk(id)
..
}
class prod_category <<assoc>> {
pfk(category_id,category.id)
pfk(product_id,product.id)
..
}
/' = = = = = = = ATTRIBUTE = = = = = = = '/
class product {
att(name,String,VARCHAR(200))
att(url,String,VARCHAR(255))
att(nutrition_grades,String,VARCHAR(1))
}
class category {
att(name,String,VARCHAR(200))
}
/' = = = = = = = ASSOCIATION = = = = = = = '/
rel(product,.,--,.,prod_category)
rel(category,.,-,.,prod_category)
@enduml