我正在爲客戶創建一個網站,他們希望能夠創建文章。我的想法是標記它們,所以我將實施該系統。數據庫佈局標記系統
什麼是最好的設計,無論是從架構和性能比較的視角:
要使表的所有標籤,然後有一個一對多的關係錶鏈接標籤這樣的:
articles table with ID
tags table with ID
one to many table with columns Article.ID and Tags.ID
2.要與文章的一個桌子和一個與標籤爲這樣的文章:
articles table with ID
tags table with Article.ID and tag text
在此先感謝!