Вопрос

I have a many to many relationship with bookmarks and tags. Each tag can have many bookmarks, and each bookmark can have many tags.

Users

  • Id
  • Username

Tags

  • Id
  • UserId
  • Title

Bookmarks

  • Id
  • UserId
  • Title
  • Link

TagsBookmarks (junction table)

  • TagId
  • BookmarkId

I have a reference to an UserId in Tags and Bookmarks table. Is this normalized? The reason I do this is because I sometimes need to load a list of tags that belong to a specific user without bookmarks, and vice versa.

Это было полезно?

Решение

Your structure is valid and normalized.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top