Skip to content

Commit

Permalink
Updating database doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ooemperor committed Mar 13, 2024
1 parent 8371855 commit 0afd276
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions doc/backend/DataModel.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ In order to understand the datamodel of the CodeGrader a little bit faster you c
(17 rows)
```

In general all tables will include 3 metadata columns.
- id: Primary Key of the table and auto generated by the database
- creation_dts: DateTime stamp of the database when the object has last been created.
- updated_dts: DateTime stamp of the database when te object has last been updated.


## Admin Type
The admin type specifies the rights that an admin has within the admin frontend.
```
Table "public.admin_type"
Column | Type | Collation | Nullable | Default
Expand All @@ -47,6 +54,7 @@ Referenced by:
```

## Admin User
Stores the user Object of an Administrator User for the admin frontend.
```
Table "public.adminuser"
Column | Type | Collation | Nullable | Default
Expand Down Expand Up @@ -75,6 +83,7 @@ Foreign-key constraints:
```

## Attachment
Table to store the properties of a file stored in the file table for additional files of a task.
```
Table "public.attachment"
Column | Type | Collation | Nullable | Default
Expand All @@ -96,6 +105,7 @@ Foreign-key constraints:
```

## Evaluation Type
The type of evaluation entities used for the evaluation of a task.
```
Table "public.evaluation_type"
Column | Type | Collation | Nullable | Default
Expand All @@ -113,6 +123,7 @@ Indexes:
```

## Evaluation Result
The result of an evaluation. One entry per Submission.
```
Table "public.evaluationresult"
Column | Type | Collation | Nullable | Default
Expand All @@ -132,6 +143,7 @@ Foreign-key constraints:
```

## Execution Result
The output of an execution for one testcase of an Submission.
```
Table "public.executionresult"
Column | Type | Collation | Nullable | Default
Expand All @@ -158,6 +170,7 @@ Foreign-key constraints:
```

## Exercise
Exercise is a logical Grouping for multiple Tasks with some additional informations.
```
Table "public.exercise"
Column | Type | Collation | Nullable | Default
Expand All @@ -181,6 +194,7 @@ Referenced by:
```

## File
Table to store Binary Data in a database.
```
Table "public.file"
Column | Type | Collation | Nullable | Default
Expand All @@ -205,6 +219,7 @@ Referenced by:
```

## Instruction
The Instructions of how to solve the task. This is a file with the file stored in the file table.
```
Table "public.instruction"
Column | Type | Collation | Nullable | Default
Expand All @@ -226,6 +241,7 @@ Foreign-key constraints:
```

## Membership
Membership shows which user can access which subject. In other words: which tasks, exercises and more he will be able to access.
```
Table "public.membership"
Column | Type | Collation | Nullable | Default
Expand All @@ -248,6 +264,8 @@ Foreign-key constraints:
```

## Profile
The profile is a logical grouping of users and other objects. This is also the grouping used for the implemetation of the
multi-client-capability.
```
Table "public.profile"
Column | Type | Collation | Nullable | Default
Expand All @@ -269,6 +287,7 @@ Referenced by:
```

## Subject
the logical grouping of multiple exercises into a subject. Can also be looked as a Course in School.
```
Table "public.subject"
Column | Type | Collation | Nullable | Default
Expand All @@ -293,6 +312,8 @@ Referenced by:
```

## Submission
A submission made by a user for a specific task. The user did a submission for a given task.
This submission will be evaluated in the execution service and following.
```
Table "public.submission"
Column | Type | Collation | Nullable | Default
Expand All @@ -319,6 +340,7 @@ Referenced by:
```

## Task
The Task is the entity of a Coding Challenge which has files attached to it such as Instructions, Attachments and more.
```
Table "public.task"
Column | Type | Collation | Nullable | Default
Expand Down Expand Up @@ -346,6 +368,8 @@ Referenced by:
```

## Testcase
A Testcase is the definition of a input and correct output. The input will be used in the execution service while the
ouput is used in the evaluation service.
```
Table "public.testcase"
Column | Type | Collation | Nullable | Default
Expand All @@ -371,6 +395,7 @@ Referenced by:
```

## Token
The Token is used for authentication of the frontend to the backend api. (Bearer Token)
```
Table "public.token"
Column | Type | Collation | Nullable | Default
Expand All @@ -388,6 +413,7 @@ Indexes:
```

## User
A User for the user frontend of the codegrader with login data.
```
Table "public.user"
Column | Type | Collation | Nullable | Default
Expand Down

0 comments on commit 0afd276

Please sign in to comment.