I'm working on a database for a simple CMS like web-app. Basically it consists of bits of content that are part of a contentgroup. Like pieces of text that are part of a page. For that I was thinking of a page
table and a text
table with a 1:n relationship.
Thing is I also want assets to be linked to either a page or a text. So a piece of text could have a thumbnail linked to it, but also a page could have a thumbnail linked to it. Somehow I just can't figure out how to do that nicely. Should I make an assets
table with the collumns pageId
and textId
and make sure only one of them is used each row? Feels a little weird to me.. Or do I just have to make two different asset tables?
Hope you guys can help me with this!