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

Refactoring of the DB schema #300

Open
christianlupus opened this issue Aug 14, 2020 · 0 comments
Open

Refactoring of the DB schema #300

christianlupus opened this issue Aug 14, 2020 · 0 comments
Labels
Backend Issue or PR related to the backend code enhancement New feature or request php Pull requests that update Php code

Comments

@christianlupus
Copy link
Collaborator

Currently the DB schema seems non-optimal solved.

Describe the solution you'd like

  1. The keywords are associated with both a recipe and a user. A recipe would be sufficient.
  2. The category is (by the schem.org standard) only one entry per recipe. This should be in a nullable column in the recipe table.
  3. The recipes are indexed by the id of their parent folder and the user id. As the parent folder is already unique, the user id is not needed and should be dropped. This also makes the update faster as shared recipes are automatically updated for all users.
  4. Adding of indices if possible.
  5. Avoid storing of series of strings (keyword as column), better use separate table with indexed foreign key + joins
  6. Optionally enhance the schema to store more details for full-text search (see discussion on matrix channel from Aug 7th to 11th)

Potentially there are more optimizations to be carried out that come up during development.

@christianlupus christianlupus added the enhancement New feature or request label Aug 14, 2020
@christianlupus christianlupus added this to To do in Codebase refactory via automation Sep 29, 2020
@christianlupus christianlupus added Backend Issue or PR related to the backend code php Pull requests that update Php code investigation-required The Issue or PR needs more in-depth analysis and removed investigation-required The Issue or PR needs more in-depth analysis labels Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Issue or PR related to the backend code enhancement New feature or request php Pull requests that update Php code
Projects
Development

No branches or pull requests

2 participants