Re: Blogs, Tags, and Categories: Database Structure Question

  • From: "E.J. Zufelt" <lists@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Wed, 27 Oct 2010 14:38:26 -0400

Good afternoon,

From the Drupal perspective there is no difference between a category or a tag. 
 Each is a taxonomy applied to a piece of content.  In drupal you can apply 0 
to many taxonomies to any piece of content.

Drupal has:

1. Vocabularies (e.g. Category, Tags), a collection of terms.

2. Terms (e.g. Sports, Accessibility), which belong to a vocabulary.

3. A content type, which can receive 0 to many  vocabularies as fields.

4. When you create a piece of content you are creating an instance of a 
particular content type, and with it are required to select terms from the 
associated vocabularies.

The association between a particular piece of content and the terms applied are 
made through a field table.  For example, field_myContentType_category.  The 
field table can be unique to a particular content type, or can be shared across 
multiple content types.  For example, you might want to have products use one 
set of categories, and blog posts use a different set of categories, but you 
might want both products and blog posts to share the same set of tags.

HTH,
Everett Zufelt
http://zufelt.ca

Follow me on Twitter
http://twitter.com/ezufelt

View my LinkedIn Profile
http://www.linkedin.com/in/ezufelt



On 2010-10-27, at 2:17 PM, Homme, James wrote:

> Hi,
> I have two related questions. In a blog, what's the difference between 
> something that is tagged and something that's in a category. Secondly, what 
> would the table structure in a database look like for such things, and how 
> would the tables be associated?
>  
> Thanks.
>  
> Jim
>  
> Jim Homme,
> Usability Services,
> Phone: 412-544-1810. Skype: jim.homme
> Internal recipients,  Read my accessibility blog. Discuss accessibility here. 
> Accessibility Wiki: Breaking news and accessibility advice
>  
> 
> This e-mail and any attachments to it are confidential and are intended 
> solely for use of the individual or entity to whom they are addressed. If you 
> have received this e-mail in error, please notify the sender immediately and 
> then delete it. If you are not the intended recipient, you must not keep, 
> use, disclose, copy or distribute this e-mail without the author's prior 
> permission. The views expressed in this e-mail message do not necessarily 
> represent the views of Highmark Inc., its subsidiaries, or affiliates.

Other related posts: