Skip to content

Refactor SQLite Database Schema for Better Performance #470

Description

@rahulharpal1603

Description

Replace inefficient JSON-based storage in Albums schema with proper relational database design using junction tables.

Tasks

  • Create proper junction table album_images to replace JSON storage
  • Update database schema:
    • Remove image_ids JSON column from albums table
    • Add album_images table with album_id and image_id foreign keys
  • Refactor database functions to use new schema
  • Update API endpoints to work with new relational structure
  • Ensure data integrity with proper foreign key constraints

Expected Outcome

  • Significantly faster album operations
  • Better scalability for large albums
  • Enhanced data integrity and query capabilities
  • Elimination of JSON serialization overhead

New Database Design: https://dbdiagram.io/d/PictoPy-685704c4f039ec6d364647e1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions