Domanda

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.

È stato utile?

Soluzione

Your structure is valid and normalized.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top