From 15a6cf326c7b430fb5c67a85ede0aeaed824a2c3 Mon Sep 17 00:00:00 2001 From: Mo8it Date: Sun, 13 Feb 2022 21:00:39 +0100 Subject: [PATCH] Update database_import documentation --- README.adoc | 2 ++ database_import.adoc | 74 ++++++++++++++++++++++++++++++++++++++++++++ database_import.md | 73 ------------------------------------------- 3 files changed, 76 insertions(+), 73 deletions(-) create mode 100644 database_import.adoc delete mode 100644 database_import.md diff --git a/README.adoc b/README.adoc index 5634d7c..69b8642 100644 --- a/README.adoc +++ b/README.adoc @@ -1,4 +1,6 @@ = AdvLabDB +:source-highlighter: highlight.js +:highlightjs-languages: bash image:https://img.shields.io/badge/code%20style-black-000000.svg[link=https://github.com/psf/black] image:https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336[link=https://pycqa.github.io/isort/] diff --git a/database_import.adoc b/database_import.adoc new file mode 100644 index 0000000..61644ec --- /dev/null +++ b/database_import.adoc @@ -0,0 +1,74 @@ += Database import + +The import file has to be a text file (with `.txt` at the end) encoded in UTF-8. It has to *strictly* follow the required format. + +You can take a look at the file link:example_database_import.txt[] for an example. + +== Required manipulation on the web interface + +The following tables can not be imported from a file and have to be manipulated on the web interface. + +* Semester +* Program +* Part +* User +* Assistant +* Experiment +* Semester Experiment + +== How to understand this document +=== ID +None of the mentioned ids in this document is meant as database id. The ids here only refer to the imported instances. The id in the database is assigned automatically. + +=== Table +* id -> 0 / 1 / 2 / ... (starts with 0 and has step 1) +* attribute -> example1 / example2 / ... (explanation) +* ... + +The type of the attributes can be seen in the drawio file link:DB.drawio[] which can be opened using https://www.diagrams.net/[diagrams.net]. Some attributes have constraints marked also in the drawio file. + +== Tables +=== Semester (only one!) +* label -> WS / SS +* year -> 21 / 22 / ... + +=== Part +* id +* number -> 1 / 2 / ... +* program_label -> BS / MS / BE / ... (for bachelor of science, master of science, bachelor of education, etc.) + +=== Student +* student_number +* first_name +* last_name +* uni_email +* _contact_email_ (optional) +* _bachelor_thesis_ (optional) +* _bachelor_thesis_work_group_ (optional) +* _note_ (optional) + +=== Group +* id +* number -> 1 / 2 / ... +* program_label + +=== Part Student +* student_number +* part_id +* group_id + +=== Experiment +* id +* number -> 1 / 2 / ... +* program_label + +=== Group Experiment +* id +* experiment_id +* group_id + +=== Appointment +* date -> 21.08.2021 +* special -> 1 / 0 +* group_experiment_id +* assistant_email diff --git a/database_import.md b/database_import.md deleted file mode 100644 index bbf65e7..0000000 --- a/database_import.md +++ /dev/null @@ -1,73 +0,0 @@ -# Database import - -The import file has to be a text file (with .txt at the end) encoded in UTF-8. It has to strictly follow the required format. - -You can take a look at the file "example_database_import.txt" for an example. - -## Has to be done on the web interface -- Semester -- Program -- Part -- User -- Assistant -- Experiment -- Semester Experiment - -## How to understand this document - -### ID -None of the mentioned ids in this document is meant as database id. The ids here only refer to the imported instances. The id in the database is assigned automatically. - -### Table -- id -> 0 / 1 / 2 / ... (starts with 0 and has step 1) -- attribute -> example / example / ... -- ... - -The type of the attributes can be seen in "DB.drawio". Some attributes have constraints marked also in "DB.drawio". Optional attributes are marked in this document with "*" at the beginning. - -## Tables - -### Semester (Only one!) -- label -> WS / SS -- year -> 21 / 22 / ... - -### Part -- id -- number -> 1 / 2 / ... -- program_label -> BS / MS / BE / ... (for bachelor of science, master of science, bachelor of education, etc.) - -### Student -- student_number -- first_name -- last_name -- uni_email -- *contact_email -- *bachelor_thesis -- *bachelor_thesis_work_group -- *note - -### Group -- id -- number -> 1 / 2 / ... -- program_label - -### Part Student -- student_number -- part_id -- group_id - -### Experiment -- id -- number -> 1 / 2 / ... -- program_label - -### Group Experiment -- id -- experiment_id -- group_id - -### Appointment -- date -> 21.08.2021 -- special -> 1 / 0 -- group_experiment_id -- assistant_email