Please support our Database Design advertiser: Programming Forums
Views: 2543 | Replies: 6
![]() |
•
•
Join Date: Feb 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
I'd like to add tags to my app. I have several different resources I would want to apply tags to, such as blogs, picture galleries and a few others. More efficient to add tag columns to each resource table or create a seperate table for tags that refrences each resource.
I can't decide on the trade off.
its a web app written in php5 and mysql5
I'd say I'm an advanced beginner at this stuff so my current implementation shows it.
Thanks
I can't decide on the trade off.
its a web app written in php5 and mysql5
I'd say I'm an advanced beginner at this stuff so my current implementation shows it.
Thanks
•
•
Join Date: Jun 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 1
•
•
•
•
I'd like to add tags to my app. I have several different resources I would want to apply tags to, such as blogs, picture galleries and a few others. More efficient to add tag columns to each resource table or create a seperate table for tags that refrences each resource.
I can't decide on the trade off.
its a web app written in php5 and mysql5
I'd say I'm an advanced beginner at this stuff so my current implementation shows it.
Thanks
It would be better to store the tags in a seperate table as you said with a reference to them in a cross reference table. This also has the benefit of avoiding duplication.
•
•
Join Date: May 2007
Location: West Coast, US
Posts: 95
Reputation:
Rep Power: 2
Solved Threads: 8
I am in process of doing something similar for one of my web sites.
I would add another question here for anyone to discuss. Is there a better design that allows to group tags so that they don't grow exponentially over time.
Imagine tags like: tag, tags, the tags, tagg, etc.
Any ideas?
Tim
I would add another question here for anyone to discuss. Is there a better design that allows to group tags so that they don't grow exponentially over time.
Imagine tags like: tag, tags, the tags, tagg, etc.
Any ideas?
Tim
hosting :: development :: design
dezignwork.com
dezignwork.com
•
•
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,468
Reputation:
Rep Power: 4
Solved Threads: 88
Thanks for reply.
You are right. That is exactly the approach that I am going with. Basically 2 tables where one holds the tag_id's and is easily searchable.
However, the solution looks too simple and possibly not very efficient. Is there any other solution that could be more efficient or is this as far as it goes?
I am talking about efficiency since I expect that there will be 300,000+ records (at least these are clients' estimations)
You are right. That is exactly the approach that I am going with. Basically 2 tables where one holds the tag_id's and is easily searchable.
However, the solution looks too simple and possibly not very efficient. Is there any other solution that could be more efficient or is this as far as it goes?
I am talking about efficiency since I expect that there will be 300,000+ records (at least these are clients' estimations)
Last edited by dezignwork : Jul 25th, 2007 at 3:28 am. Reason: spelling
hosting :: development :: design
dezignwork.com
dezignwork.com
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode