Skip to content
GitLab
Explore
Sign in
This is an archived project. Repository and other project resources are read-only.
Alexander Moltu
DCST1008-studass-eksempel
Wiki
Persistence
Persistence
· Changes
Page history
Create Persistence
authored
Mar 14, 2022
by
Alexander Moltu
Show whitespace changes
Inline
Side-by-side
Persistence.md
0 → 100644
View page @
6479da61
<h3>
All data is stored in the MySQL database
</h3>
<h4>
ER-model of the database and how the entities are connected to it
</h4>
<img
src=
"https://media.discordapp.net/attachments/749996590621524151/836570699346608178/image0.png?width=899&height=676"
>
**The SQL calls to create the database tables needed:**
```
CREATE TABLE Tasks (
id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
name text NOT NULL,
description text NOT NULL,
priority Boolean NOT NULL,
startDate text NOT NULL,
endDate text NOT NULL,
Completedate text,
categoryId INT NOT NULL
);
CREATE TABLE Categorys (
id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
name text NOT NULL,
description text NOT NULL
);
CREATE TABLE CompletedTasks (
id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
name text NOT NULL,
description text NOT NULL,
priority Boolean NOT NULL,
startDate text NOT NULL,
endDate text NOT NULL,
Completedate text NOT NULL,
categoryId INT NOT NULL
);
```