This repository has been archived on 2024-05-21. You can view files and clone it, but cannot push or open issues or pull requests.
edu-dis-labs/docs/design/README.md

120 lines
2.2 KiB
Markdown
Raw Normal View History

2024-04-30 22:06:45 +03:00
# Проєктування бази даних
2021-08-30 18:54:57 +03:00
2024-04-30 22:06:45 +03:00
## BE модель
2021-08-30 18:54:57 +03:00
<center style="
border-radius:4px;
border: 1px solid #cfd7e6;
box-shadow: 0 1px 3px 0 rgba(89,105,129,.05), 0 1px 1px 0 rgba(0,0,0,.025);
padding: 1em;"
>
@startuml
entity Account <<ENTITY>>
2024-04-30 22:06:45 +03:00
entity Account.username <<TEXT>>
entity Account.password <<TEXT>>
2021-08-30 18:54:57 +03:00
entity Survey <<ENTITY>>
2024-04-30 22:06:45 +03:00
entity Survey.name <<TEXT>>
entity Survey.duration <<TEXT>>
entity Survey.isPaused <<BOOLEAN>>
entity Survey.isNamed <<BOOLEAN>>
2021-08-30 18:54:57 +03:00
entity Question <<ENTITY>>
2024-04-30 22:06:45 +03:00
entity Question.text <<TEXT>>
2021-08-30 18:54:57 +03:00
entity Responce <<ENTITY>>
2024-04-30 22:06:45 +03:00
entity Responce.value <<TEXT>>
2021-08-30 18:54:57 +03:00
entity Link <<ENTITY>>
entity Link.usageLimit <<INT>>
entity Link.responceLimit <<INT>>
entity Link.uses <<INT>>
entity Link.responces <<INT>>
entity Link.path <<TEXT>>
2024-04-30 22:06:45 +03:00
Account.username --* Account
Account.password --* Account
2021-08-30 18:54:57 +03:00
2024-04-30 22:06:45 +03:00
Survey.name --* Survey
Survey.duration --* Survey
Survey.isPaused --* Survey
Survey.isNamed --* Survey
2021-08-30 18:54:57 +03:00
Link.usageLimit -u-* Link
Link.responceLimit -u-* Link
Link.uses --* Link
Link.responces --* Link
Link.path -u-* Link
2024-04-30 22:06:45 +03:00
Responce.value -u-* Responce
2021-08-30 18:54:57 +03:00
2024-04-30 22:06:45 +03:00
Question.text -u-* Question
2021-08-30 18:54:57 +03:00
2024-04-30 22:06:45 +03:00
Account "1,1" -- "0,*" Survey
Survey "1,1" -- "0,*" Question
Question "1,1" -r- "0,*" Responce
Account "0,1" -r- "0,*" Responce
Link "0,*" -- "1,1" Survey
2021-08-30 18:54:57 +03:00
@enduml
</center>
## ER-модель
2021-08-30 18:54:57 +03:00
<center style="
border-radius:4px;
border: 1px solid #cfd7e6;
box-shadow: 0 1px 3px 0 rgba(89,105,129,.05), 0 1px 1px 0 rgba(0,0,0,.025);
padding: 1em;"
>
2021-08-30 18:54:57 +03:00
@startuml
entity Account <<ENTITY>> {
id:INT
username:CHAR(64)
password:CHAR(256)
}
entity Responce <<ENTITY>> {
id:INT
value:CHAR(16384)
}
entity Question <<ENTITY>> {
id:INT
text:CHAR(256)
}
entity Survey <<ENTITY>> {
id:INT
name:CHAR(256)
duration:CHAR(256)
isPaused:BOOLEAN
isNamed:BOOLEAN
}
entity Link <<ENTITY>> {
id:INT
uses:INT
responces:INT
usageLimit:INT
responceLimit:INT
path:CHAR(32)
}
Responce "0,*" --> "1,1" Question
Question "0,*" --> "1,1" Survey
Survey "0,*" --> "1,1" Account
Link "0,*" --> "1,1" Survey
Responce "0,*" --> "0,1" Account
@enduml
</center>
## Реляційна схема
![relational_schema](./relational_scheme.png)