Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What tag schema(s) are the most efficient/effective?

People also ask

What is a tag schema?

The Tag Schema Common Service is an IBM Multicloud Management Platform (MCMP) feature that allows you to set policies governing the use of tags in MCMP to help you organize your reports and monitor and enforce compliance. The tag schema service supports both MCMP internal and external (provider side) tags.

What are tags in a database?

In information systems, a tag is a keyword or term assigned to a piece of information (such as an Internet bookmark, multimedia, database record, or computer file). This kind of metadata helps describe an item and allows it to be found again by browsing or searching.

What is Use of Schema?

Schema is a markup system and form of code that you place on your website to make it easier for search engines to understand its contents. This system was supported by a number of search engines, including Google, Microsoft, Yahoo, and Yandex, as an effort to make site content clearer for multiple search engines.

How do I store post tags in a database?

If space is going to be an issue, have a 3rd table Tags(Tag_Id, Title) to store the text for the tag and then change your Tags table to be (Tag_Id, Item_Id). Those two values should provide a unique composite primary key as well. Show activity on this post.


It all depends on data volumes and content to tag distribution and density ratios

If you have a low tag distribution and density ratio (typical human generated data) you can simply generate an unique id or hash for each possible collection of tags in use by the data. Associate the 'tag collection' id with each data instance with those tags

This can work surprisingly well for many forms of human generated data

e.g. Stackoverflow has ~500,000 questions, and ~20,000 tags (too many dupe-ish tags!). Most questions have less than five tags. At worst case scenario you will have 500,000 'tag collection' id's to associate , but more realistically you will have several thousand

You also will either have to have instance tracking or garbage collection on the 'tag collection' collection as specific combination of tags fall out of use

e.g.

  • Tag: id, tagName
  • TagCollection: id, instanceCount
  • TagCollectionTag: tagCollectionIId, tagId
  • Data: id, title, content, tagCollectionId

Inserting tags is fast if a hash is used (hash on all tags of the collection). Otherwise you have to search the TagCollection and TagCollectionTag collections, but this should not be too large anyway

Searching is fast; search TagCollectionTag for instances containing the specific set of tags, and then find data rows with any of those tagCollectionId's

Hope that wasn't too confusing :-)


You could start with this: http://tagging.pui.ch/post/37027746608/tagsystems-performance-tests

mentioned in this: Scaling Web Applications and Tagging - Digg, Del.icio.us, StackOverflow