From 6f40f3ba9b3d79b65a2788e63c2f89ff957405c6 Mon Sep 17 00:00:00 2001
From: Tini Tran <tinit@stud.ntnu.no>
Date: Mon, 8 Apr 2024 07:48:41 +0200
Subject: [PATCH] Update README.md

---
 README.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/README.md b/README.md
index 1619dca..ecc792e 100644
--- a/README.md
+++ b/README.md
@@ -131,7 +131,16 @@ JavaDoc:
 The following javadoc can be found inside the target file the same way as it is for the jacico test-coverage.
 
 path: /target/site/apidocs/index.html
+## Database
+The current database we are using is H2 database. Our database configuration is H2 inmemory database, more details can be found inside application properties.
 
+In the initiation of backend, test data are created instantly. The initiation happens in LoadDatabaseConfig file.
+
+There are currently two users that are already defined in the database in the initialization. 
+
+`user 1: "username": "test", "password": "password"`<br/>
+
+`user 2: "username": "test2, "password": "password"`
 ## Future work
 ### Implementing administration 
 The problem with the current program is that there is no administrative methods that are used. Currently, the only admin methohd is an api-call for getting all users and trivios, but for now, they are not used in prod, but rather for testing.  
@@ -143,6 +152,9 @@ As for now, we only have the timestamps and date for submitting the score. In th
 Our current method for storing the key is inside the application.properties file. For now, it is really not good practice, cause the key is out in public. In the future we could implement other methods to store the secret key. Either in differnt application.propeterties file or databases or env.files. 
 
 
+### Different approach than an inmemory database
+As we mentioned previously, we used h2 inmemory database, which meant by design that it is volatile and results in dataloss after application start. This can be changed in behavior by using a file-based storage in h2. 
+
 ## Authors
 Gia Hy Nguyen  
 Tini Tran  
-- 
GitLab