Skip to content

SQLite table for tags #736

Description

@sjehuda

Feature requests

This is a proposal to add two tables to the database.

Table: Bookmarks
Columns: Bookmark_ID, Bookmark_Title, ...

Table: Tags
Columns: Tag_ID, Tag_Name

Table: Bookmarks_Tags
Columns: Bookmark_ID, Tag_ID

This should be storage wise and accelerate queries.

See my implementation at Slixfeed/sqlite.py

        tagged_feeds_table_sql = (
            """
            CREATE TABLE IF NOT EXISTS tagged_feeds (
                id INTEGER NOT NULL,
                feed_id INTEGER NOT NULL,
                tag_id INTEGER NOT NULL,
                FOREIGN KEY ("feed_id") REFERENCES "feeds" ("id")
                  ON UPDATE CASCADE
                  ON DELETE CASCADE,
                FOREIGN KEY ("tag_id") REFERENCES "tags" ("id")
                  ON UPDATE CASCADE
                  ON DELETE CASCADE,
                PRIMARY KEY ("id")
              );
            """
            )

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions