Creating a tagging system

Posted on 2007-10-18
Last Modified: 2010-04-06
Hi there,

I need some help planning and executing a content tagging system (such as the one Flickr has to tag pictures). I want to know what is the correct way to design the database in the best optimized way to have tags stored at and related to the content they wrere `tagged` to.
I need the tags to be used for pictures, blog posts and some more extra content.
Also, I don't have any idea how to make popular tags be bigger and vice versa

Please notice - I don't want any ready code or examples, just theory guide lines.

P.S. I use ASP and Access database.

Thanks :-)
Question by:shmulik15
    LVL 28

    Accepted Solution

    Depending on the size of your site, you may want to look at a MySQL or MS SQL DB. It will be a lot faster and better in the long run.

    As far as the DB structure, I would say you need 3 tables:




    The first table contains all the information about your item, i.e. a picture. The Last table contains all possible tags that can be associated with an Item. The middle table will link the PK of the first table to the PK of the last table which will allow you to easily get all tags associated with a particular item.

    Author Comment

    Thanks !

    As for my second question - How do I make display of "popular tags", the popular the bigger etc?
    LVL 28

    Expert Comment

    Make the table like this instead:

       Populate (bit)

    Then in your code determine if it is popular and add a style around it.

    Author Comment

    Your popular field gave me an idea, I'll add something that counts the tags every 24 hours and rate them.

    Your help is much appreciated.
    Thanks again.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
    Read about why website design really matters in today's demanding market.
    Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
    Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now