Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement 1] Database Specification #22

Closed
ScottCTD opened this issue Nov 6, 2022 · 1 comment · Fixed by #26
Closed

[Improvement 1] Database Specification #22

ScottCTD opened this issue Nov 6, 2022 · 1 comment · Fixed by #26
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ScottCTD
Copy link
Collaborator

ScottCTD commented Nov 6, 2022

  • Currently, we need to design 2 types of tables: user tables and bill tables.

User Table

Table Name: users

Table Specifications:

Column Name Data Type Notes
user_id INT
user_name 'VARCHAR(10)' The max user name length is 10
password 'VARCHAR(16)' The max password length is 16
bill_id INT This is the main bill id of this user

Bill Table

Table Name: bill_{bill_id}

Side Note: We shouldn't use user_id as the bill_id because a user may have multiple bills (like many splitter bills)

Table Specifications:

Column Name Data Type Notes
entry_id INT
date 'TIMESTAMP'
value 'DECIMAL(16, 2)' We expect value to have 16 integer places and 2 decimal places
CURRENCY CHAR(3) As defined in ISO 4217, currency codes all have a length of 3
description TEXT
from TEXT
to TEXT
location TEXT
'split_bill_id' 'INT' WIP

@Lei-Tin Please check these specifications and adjust your implementation if needed.

Any suggestions are appreciated.

@ScottCTD ScottCTD added enhancement New feature or request help wanted Extra attention is needed labels Nov 6, 2022
@Lei-Tin
Copy link
Collaborator

Lei-Tin commented Nov 6, 2022

Understood, will modify and PR in reading week.
👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
2 participants