While Yahoo is the only one of the big three to take meta keywords in to consideration they are also necessary for WAI AAA compliance. I'd like to store them in a database table though treat them as tags. Each page may have up to a maximum of seven tags. The issue is how would I best approach such a setup? I could setup seven columns though I'm not sure that would be necessary.
Thoughts please?
Treat meta keywords as tags: ideas for database approach?
Moderator: General Moderators
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
- VirtuosiMedia
- Forum Contributor
- Posts: 133
- Joined: Thu Jun 12, 2008 6:16 pm
Re: Treat meta keywords as tags: ideas for database approach?
How about this approach: Each page has an ID as a primary key, in addition to other properties. The tags would be stored in a separate table, each tag with an ID and then the tag text. Then a third table would contain the associations between the pages and tags and would consist of the associationId (as a primary key), pageId (as a foreign key), and the tagId (as a foreign key).JAB Creations wrote:While Yahoo is the only one of the big three to take meta keywords in to consideration they are also necessary for WAI AAA compliance. I'd like to store them in a database table though treat them as tags. Each page may have up to a maximum of seven tags. The issue is how would I best approach such a setup? I could setup seven columns though I'm not sure that would be necessary.
Thoughts please?
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Treat meta keywords as tags: ideas for database approach?
Not sure I understand but it sounds like you want to express an 1:n relationship in which case it's best done:
Alternatively you could store each keyword/tag in a CSV field but if you want to generate tag clouds like Yahoo the above scehma will make it much easier and more efficient I would imagine.
Code: Select all
Pages:
------
pkid, title, description, primary_content
Pages_Tags:
------------
pkid, fkid, tag_name- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: Treat meta keywords as tags: ideas for database approach?
VirtuosiMedia's idea makes me wonder why I hadn't thought of that...
I'm not thinking about tag clouds...I just want to make sure if there is some benefit I see in the future that I'll have a system already implemented that I can take advantage of.
The three table solution sounds beautiful.
CSV, comment separated values?
I'm not thinking about tag clouds...I just want to make sure if there is some benefit I see in the future that I'll have a system already implemented that I can take advantage of.
The three table solution sounds beautiful.
CSV, comment separated values?
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Treat meta keywords as tags: ideas for database approach?
Three tables is the most flexible approach...
Comma separated values...like a CSV file or XLSCSV, comment separated values?