User tables for future database #221

Closed
opened 2026-04-10 09:00:38 +00:00 by a24vinla · 6 comments
Collaborator

To be able to support users we need to store relevant data. We need to design these tables.

Parent Issue: #143

To be able to support users we need to store relevant data. We need to design these tables. Parent Issue: #143
Collaborator

Does a list of information that should be saved for each user exist or should i create one?

Does a list of information that should be saved for each user exist or should i create one?
Collaborator

list of possible information that should be stored

Possible tables

  • User
    • Stores private info about the user
  • Role
    • Sore role specific information
  • Settings
    • Stores the saved user settings
  • Layout

user table

  • UserId
    • For students
      • a22erigr
    • For teachers
      • andras.marki
  • FName
    • john
  • LName
    • doe
  • Email
  • Role
    • Student
    • Teacher
    • other
      • IT-support
      • Administration
  • Password
    • The password should be hashed
    • Restraints
      • Min length
      • Must contain special characters
# list of possible information that should be stored ## Possible tables + User + Stores private info about the user + Role + Sore role specific information + Settings + Stores the saved user settings + Layout ## user table + UserId + For students + a22erigr + For teachers + andras.marki + FName + john + LName + doe + Email + Maybe only store his mail. Can be accomplished with regex + Student + a22erigr@student.his.se + Teacher + andras.marki@his.se + Role + Student + Teacher + other + IT-support + Administration + Password + The password should be hashed + Restraints + Min length + Must contain special characters
Collaborator

I believe it does not exist, if you look at issue:#148 i have used some "examples" on what could be stored such as emails, ID, password and how that should be stored.
#148 (comment)

I believe it does not exist, if you look at issue:#148 i have used some "examples" on what could be stored such as emails, ID, password and how that should be stored. https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/148#issuecomment-1799
Collaborator

Fast sketch of how the tables relates to each other.

Open to suggestions
bild

  • Each user has one settings
    • Setting needs a user to exist
  • Each user can have multiple roles
    • Can be a student that works extra as IT-Support
    • Roles can exist independent of User
# Fast sketch of how the tables relates to each other. Open to suggestions ![bild](/attachments/596bf04d-541c-4233-8f97-067a10f9967d) + Each **user** has one **settings** + Setting needs a user to exist + Each **user** can have multiple **roles** + Can be a student that works extra as IT-Support + **Roles** can exist independent of **User**
83 KiB
Collaborator

@b24krila wrote in #221 (comment):

I believe it does not exist, if you look at issue:#148 i have used some "examples" on what could be stored such as emails, ID, password and how that should be stored. #148 (comment)

Looking in to it

@b24krila wrote in https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/221#issuecomment-1862: > I believe it does not exist, if you look at issue:#148 i have used some "examples" on what could be stored such as emails, ID, password and how that should be stored. #148 (comment) Looking in to it
Collaborator

The sketch works as a prototype, it shows the relations well and paints a clear picture.

The parts that might need more discussion which you might realize from issue #148 is how do we store emails as it can be referred to as "sensitive" information my solution pointed out in issue #148 is to encrypt/hash the email and store the encrypted for fast look up.

The same for password were we instead store a hashed password + salt, Where each time you login we hash the password entered with the salt and see if the stored value matches what was entered.

Then logically we do not need to store FullName for we can get that information from first name and last name.

The sketch works as a prototype, it shows the relations well and paints a clear picture. The parts that might need more discussion which you might realize from issue #148 is how do we store emails as it can be referred to as "sensitive" information my solution pointed out in issue #148 is to encrypt/hash the email and store the encrypted for fast look up. The same for password were we instead store a hashed password + salt, Where each time you login we hash the password entered with the salt and see if the stored value matches what was entered. Then logically we do not need to store FullName for we can get that information from first name and last name.
Sign in to join this conversation.
No milestone
No project
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K#221
No description provided.