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

GS current Release schema #2

Closed
atherdon opened this issue Mar 10, 2018 · 33 comments
Closed

GS current Release schema #2

atherdon opened this issue Mar 10, 2018 · 33 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@atherdon
Copy link
Contributor

atherdon commented Mar 10, 2018

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

@atherdon atherdon added help wanted Extra attention is needed good first issue Good for newcomers labels Mar 11, 2018
@khyati0212
Copy link
Collaborator

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
Copy link
Contributor Author

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

@atherdon
Copy link
Contributor Author

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
Copy link
Contributor Author

@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
Copy link
Collaborator

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

@atherdon
Copy link
Contributor Author

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
Copy link
Collaborator

My question is how item and ingredient are different?

@khyati0212
Copy link
Collaborator

@atherdon I am trying to understand the schema more.

@khyati0212
Copy link
Collaborator

@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
Copy link
Contributor Author

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
Copy link
Collaborator

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

@khyati0212
Copy link
Collaborator

Purchase can have favorite item coloumn.

@khyati0212
Copy link
Collaborator

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

@atherdon
Copy link
Contributor Author

atherdon commented Mar 14, 2018 via email

@atherdon
Copy link
Contributor Author

atherdon commented Mar 14, 2018 via email

@khyati0212
Copy link
Collaborator

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

@atherdon
Copy link
Contributor Author

atherdon commented Mar 14, 2018 via email

@khyati0212
Copy link
Collaborator

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
Copy link
Contributor Author

atherdon commented Mar 14, 2018 via email

@khyati0212
Copy link
Collaborator

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
Copy link
Collaborator

  • Grocery table can eliminate Description field as it is already there in ingredient table.

  • Userfav table can have just GroceryId column and no ingredientId column. As Grocery table is already having ingredientId as foreign key.

  • User table can eliminate ingredientId field as it has groceryId field as foreign key. And it can have itemId field added as foreign key.

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

@atherdon
Copy link
Contributor Author

atherdon commented Mar 14, 2018 via email

@khyati0212
Copy link
Collaborator

Good Morning and no rush.

@atherdon
Copy link
Contributor Author

working on reply

@atherdon
Copy link
Contributor Author

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
Copy link
Collaborator

Yeah I also thought more details are needed.

@atherdon
Copy link
Contributor Author

atherdon commented Mar 15, 2018 via email

@khyati0212
Copy link
Collaborator

Great

@khyati0212
Copy link
Collaborator

Let me know if I can be of any help.

@atherdon
Copy link
Contributor Author

atherdon commented Mar 15, 2018 via email

@atherdon
Copy link
Contributor Author

atherdon commented Mar 15, 2018 via email

@khyati0212
Copy link
Collaborator

Sure

@khyati0212
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants