Skip to content

Refactoring of the DB schema #300

@christianlupus

Description

@christianlupus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BackendIssue or PR related to the backend codeenhancementNew feature or requestphpPull requests that update Php code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions