ChickenKyiv / database-visuals

GNU General Public License v3.0
0 stars 0 forks source link

GS current Release schema #2

Closed atherdon closed 6 years ago

atherdon commented 6 years ago

Main repository: https://github.com/GroceriStar/groceristar I move models here: https://github.com/ChickenKyiv/database-visuals/tree/master/groceristar/models

Review this files, dig into that JSON structure and create a visual for the current release.

Then I want to hear your ideas about how this schema can be improved.

7

khyati0212 commented 6 years ago

Hi @atherdon,

I have created visual for this schema : https://sqldbm.com/Project/MySQL/Share/v1Tcp4mXo3Gy1tmiICeBJg

Can you check it? If it is correct I will update all other by tomorrow morning. And if not please give feedback to improve.

atherdon commented 6 years ago

It's amazing. i have no words. really cool. and very informative.

atherdon commented 6 years ago

i know that current system is not ideal. Do you have an ideas, how we can make it better(example - I think favorite part is not). let's discuss this here

atherdon commented 6 years ago

@khyati0212 we still need to discuss what should be improved at my current DB architecture by your opinion? let's discuss it here, and i'll be able to close this issue.

khyati0212 commented 6 years ago

I am working on that. I will message you my finding in 3 hours. Its dinner time for me so.

atherdon commented 6 years ago

Good! don't want to push - just have your time. just want to discuss future improvements and move to a next tasks. have a nice meal!

khyati0212 commented 6 years ago

My question is how item and ingredient are different?

khyati0212 commented 6 years ago

@atherdon I am trying to understand the schema more.

khyati0212 commented 6 years ago

@atherdon my suggestion to improve the schema is if "ITEM" and "INGREDIENT" are kind of similar than we can normalize them. I am confused about "FAVOURITE".

atherdon commented 6 years ago

Ingredient - table that used at online GS version. Each time when user add ingredient to the list - we have a new row.

Item - a table that I plan to use in the next releases. Main goal: add measurements and flags/attributes to an ingredient. So each item can be milk (Ingredient) + 1 L (Qty and measurement) + 1 (ingredient stored at favorite list) + 1 (item is purchased at current shopping list) So item have more advanced functionality

Favorite and purchased is a quite similar thing. But first is related to user(you can list all favorite ingredients or maybe items at user profile), purchased always related to grocery list - and you can list all purchased items by grocery list ID

khyati0212 commented 6 years ago

Still I think ITEM and INGREDIENT has kind of similar functionality. So you can replace ITEM with advance version INGREDIENT.

khyati0212 commented 6 years ago

Purchase can have favorite item coloumn.

khyati0212 commented 6 years ago

These are 2 improvement came to my mind. What are your thoughts.?

atherdon commented 6 years ago

give me more info about replacing ITEM with advanced ingredient. maybe sample. this is an interesting idea - i don't think about it. let's think about it. but if we replace ITEM - how you'll handle this case: I add "1 L milk" - purchased - price $3 i also planed to have price tracker

On 14-Mar-2018 at 04:11 PM, Khyati wrote:

Purchase can have favorite item coloumn.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ChickenKyiv/database-visuals/issues/2#issuecomment-373079580, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZrDtQXmJYWjjYfQPVxLSq_5bQdDYUCks5teUEtgaJpZM4SlD0o .

atherdon commented 6 years ago

not sure about mixing favorite with purchased... i mean if i buy "1 L milk" and "300 ml of milk" - both will be purchased. but do we need to have both this records in favorite or maybe save just milk?

On 14-Mar-2018 at 04:11 PM, Khyati wrote:

Purchase can have favorite item coloumn.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ChickenKyiv/database-visuals/issues/2#issuecomment-373079580, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZrDtQXmJYWjjYfQPVxLSq_5bQdDYUCks5teUEtgaJpZM4SlD0o .

khyati0212 commented 6 years ago

Yeah that is true. Than we cannot mix purchase with favorite. I didn't considered quantity previously.

atherdon commented 6 years ago

it was my fault - i don't share with you plans for later releases. not a problem

On 14-Mar-2018 at 04:23 PM, Khyati wrote:

Yeah that is true. Than we cannot mix purchase with favorite. I didn't considered quantity previously.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ChickenKyiv/database-visuals/issues/2#issuecomment-373084077, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZrDnnDMG8ja-XcP3f3vHfN7wYvNfIMks5teUPzgaJpZM4SlD0o .

khyati0212 commented 6 years ago

Yeah regarding price tracker I could not see price field anywhere.

Also when user buy same thing more than once. How it will be handled in Purchased?

atherdon commented 6 years ago

if this will be stored at different grocery lists - there not problem. if we add one ingredient(i.e. milk) twice - we'll calculate them automatically. so 2 rows became one 1.3L of milk(if milk is similar)

On 14-Mar-2018 at 04:36 PM, Khyati wrote:

Yeah regarding price tracker I could not see price field anywhere.

Also when user buy same thing more than once. How it will be handled in Purchased?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ChickenKyiv/database-visuals/issues/2#issuecomment-373088672, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZrDsyLdH7nCLlsYX0R0cyK-n9D1RXRks5teUb1gaJpZM4SlD0o .

khyati0212 commented 6 years ago

Sorry to ask too many questions. But my question was purchased is the list of items stored somewhere. So every grocery list might be stored differently. Right? So what if user buy same item with same quantity on different dates. So there will be same row stored twice. just with different date. Rest of columns will have same values.

Example: "1 L mik" on "03/12/2018" by user " Jane Doe" "1 L milk" on "03/13/2018" by user "Jane Doe"

khyati0212 commented 6 years ago

Please let me know your thoughts regarding these suggestions @atherdon .

atherdon commented 6 years ago

questions are good - and i like that we're setup a working flow here. just awake and will answer to your messages soon

On 14-Mar-2018 at 04:50 PM, Khyati wrote:

Sorry to ask too many questions. But my question was purchased is the list of items stored somewhere. So every grocery list might be stored differently. Right? So what if user buy same item with same quantity on different dates. So there will be same row stored twice. just with different date. Rest of columns will have same values.

Example: "1 L mik" on "03/12/2018" by user " Jane Doe" "1 L milk" on "03/13/2018" by user "Jane Doe"

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ChickenKyiv/database-visuals/issues/2#issuecomment-373093888, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZrDpAUhqFYa7PRm2OumOreiCAPDlcNks5teUpLgaJpZM4SlD0o .

khyati0212 commented 6 years ago

Good Morning and no rush.

atherdon commented 6 years ago

working on reply

atherdon commented 6 years ago

let's pause this topic and switch to some other task. I see that I need more time to reply and put more details in one place

khyati0212 commented 6 years ago

Yeah I also thought more details are needed.

atherdon commented 6 years ago

i think in one-two days i'll complete my document.

On 15-Mar-2018 at 03:20 PM, Khyati wrote:

Yeah I also thought more details are needed.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ChickenKyiv/database-visuals/issues/2#issuecomment-373413561, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZrDiaNuTlOMpG5ns31226I61WxVGKPks5teoajgaJpZM4SlD0o .

khyati0212 commented 6 years ago

Great

khyati0212 commented 6 years ago

Let me know if I can be of any help.

atherdon commented 6 years ago

i think you should jump into search api task - right now it's about "Arthur must find all information at different old repositories and move it on this clean repo".

On 15-Mar-2018 at 05:01 PM, Khyati wrote:

Let me know if I can be of any help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ChickenKyiv/database-visuals/issues/2#issuecomment-373449772, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZrDvPxn5x64fyFCGjicQFEoP339qO4ks5tep54gaJpZM4SlD0o .

atherdon commented 6 years ago

we did more complex research with you - more than i expect on this task :)

On 15-Mar-2018 at 05:01 PM, Khyati wrote:

Let me know if I can be of any help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ChickenKyiv/database-visuals/issues/2#issuecomment-373449772, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZrDvPxn5x64fyFCGjicQFEoP339qO4ks5tep54gaJpZM4SlD0o .

khyati0212 commented 6 years ago

Sure

khyati0212 commented 6 years ago

This issue was moved to ChickenKyiv/api-extended-database#9