johnding1996 / HKUST-COMP3111H-Group

Group Project of COMP 3111H in Fall 2017 at HKUST
Apache License 2.0
0 stars 0 forks source link

Database user infomation table and JSON format design and reviewment #30

Closed wenshuoguo closed 6 years ago

wenshuoguo commented 6 years ago

Current userinfo table structure

                                 Table "public.userinfo"
   Column    |         Type          | Modifiers | Storage  | Stats target | Description
-------------+-----------------------+-----------+----------+--------------+-------------
 id          | integer               | not null  | plain    |              |
 name        | character varying(30) |           | extended |              |
 age         | numeric(3,0)          |           | main     |              |
 gender      | gendertype            |           | plain    |              |
 weight      | numeric(6,2)          |           | main     |              |
 height      | numeric(6,2)          |           | main     |              |
 goal_weight | numeric(6,2)          |           | main     |              |
 due_date    | date                  |           | plain    |              |
Indexes:
    "userinfo_pkey" PRIMARY KEY, btree (id)

This issues is to review its format.

johnding1996 commented 6 years ago

@thomaszhouan What is the requirements on user_id?

thomaszhouan commented 6 years ago

LINE API is using String that contains alphanumeric letters.

johnding1996 commented 6 years ago

@thomaszhouan please give me some examples, are they hash codes?

thomaszhouan commented 6 years ago

"userId": "U813f61a35fbb9cc3adc28da525abf1fe" Not sure whether this is obtained from hashing but even it is we cannot know the hashing algorithm LINE API use, so cannot count on that.

johnding1996 commented 6 years ago

@thomaszhouan OK, the current amendment is to change the user_id field to char(32).

johnding1996 commented 6 years ago

Closed since out-of-dated.