Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact .

The use of the Community Blog is covered by our Community Blog Guidelines - please read before commenting or posting.


Content, MetaData and Taxonomy – 2 – Overview of the Data Layer

This article is cross-posted from my personal blog.

In DotNetNuke version 5.3, we introduced the concept of a centralized Content store, together with the ability to apply Taxonomies (categories) to the content.  We have extended this in DNN 5.4 by completing the MetaData API as well as adding Folksonomy (user tags).

In this series of blogs I will explain how developers can take advantage of these new features in their own extensions.

In the first blog in this series I covered the Taxonomy Manager and how an admin can use the new taxonomy features.  Next I will review the Data Structue for these components

ContentItems

Figure 1 shows the ContentItems and ContentTypes tables. 

Figure 1: The ContentItems and ContentTypes Tables

Content_Taxonomy_1

Most of the columns in the ContentItems Table are self-explanatory, but for completeness they are summarized below:

  • ContentItemID – Primary Key Identity column
  • ContentTypeID – Foreign Key to the ContentTypes Table
  • TabID – The tab/page where the content belongs
  • ModuleID – the module which “owns” the content
  • Content – the content
  • ContentKey – a key which uniquely identifies the Content Item
  • Indexed – for future use when Search is integrated
  • CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate – standard audit fields

The ContentTypes Table is a look-up table which defines various types of content – by default two types are defined – Tab/Page and Module.  Module Developers are free to add their own Content Types – for example Blog Post or Forum Post.

MetaData

Each ContentItem can have many related items of MetaData (see Figure 2)

Figure 2: Content MetaData Tables

Content_Taxonomy_2


The MetaData table defines the types of MetaData, while the ContentItems_MetaData join table provides the many-to-many relationship, together with a value for the MetaData.  By default DNN will define the 15 types of MetaData defined by the Dublin Core standard

  1. Title
  2. Creator
  3. Subject
  4. Description
  5. Publisher
  6. Contributor
  7. Date
  8. Type
  9. Format
  10. Identifier
  11. Source
  12. Language
  13. Relation
  14. Coverage
  15. Rights

However, the API supports the addition of other MetaData types.  It should be noted that their is no restriction in the number of each MetaData item.  For example a piece of content could have 3 Sources or a Creator and multiple Contributors.

Vocabularies and Terms

In addition to defining MetaData for a piece of content, we have added support for a rich taxonomy/folksonomy.  Taxonomy is defined as “the practice and science of classification” – Wikipedia, while Folksonomy is defined as “collaborative tagging” – Wikipedia

Usually, taxonomy refers to the practice of using hierarchical categories applied to the content by a “content editor”, while folksonomy refers to the practice of free-form tagging of content by users. 

In DotNetNuke, while we expose both of these at the presentation layer, in the API and Data Layer they are implemented using a common data structure.

Figure 3: Vocabularies and Terms Tables

Content_Taxonomy_3

(Click on the image to see a larger version)

In DNN you can create multiple Vocabularies.  A Vocabulary is a collection of terms that relate to each other.  For example we could define a Vocabulary of Electronics terms or a Vocabulary of Colors.  Let’s first look at the columns defined in the Vocabularies Table

  • VocabularyID – Primary Key Identity column
  • VocabularyTypeID – Foreign Key to the VocabularyTypes table – this defines the types of vocabulary – we currently support two types a hierarchical Vocabulary and a simple (or flat) Vocabulary.
  • Name – the Name of the Vocabulary
  • Description – a Description for the Vocabulary
  • Weight – unused – but is intended to provide a mechanism to sort the Vocabularies
  • ScopeTypeID – A Foreign Key to the ScopeTypes table – this defines a scope for the vocabulary – we currently support two scopes – Application and Portal/Site
  • ScopeID – Used in conjunction with the ScopeTypeID – if the scope type is “Portal” this will be the PortalID for which this vocabulary is scoped
  • IsSystem – a flag which identifies this vocabulary as a “System” Vocabulary – one which cannot be deleted.
  • CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate – standard audit fields

For the Terms Table we have the following columns.

  • TermID – Primary Key Identity column
  • VocabularyID – Foreign Key to “parent” Vocabulary table
  • ParentTermID – Parent Term in hierarchical Vocabularies
  • Name – the Name of the Term
  • Description – a Description for the Term
  • Weight – unused – but is intended to provide a mechanism to sort the Terms
  • TermLeft, TermRight – used in the “Nested-Set” method of storing a heirarchical structure in a flat table – more in a future blog.
  • CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate – standard audit fields

DNN 5.4 adds a new System Vocabulary called Tags.  This Vocabulary is where the user-entered tags (folksonomy) are stored.

This blog is an overview of the Data Structure of the Content/Taxonomy features.  In the next blog I will go into detail on the “Nested Set” design used for the storage of hierarchical terms in the flat Terms table.

Comments

Chinna Botla
Hi,

I am using DNN for one of my website, recently I heard about this Dublin Core, Can any one please suggest me in detail how can I use Duplin Core for my DNN website.

Thanks.
Chinna Botla Monday, January 20, 2014 6:44 AM (link)
Amanda Thomas
Hi, I know this is an old post, but.... is there an explanation anywhere online now of how TermLeft and TermRight work in the Taxonomy_Terms table? I think this may what's giving me issues.
Thanks!
Amanda Thomas Wednesday, October 29, 2014 5:32 PM (link)

Comment Form

Only registered users may post comments.

NewsArchives


Aderson Oliveira (22)
Alec Whittington (11)
Alessandra Daniels (3)
Alex Shirley (10)
Andrew Hoefling (3)
Andrew Nurse (30)
Andy Tryba (1)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (37)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Bogdan Litescu (1)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (213)
Chris Paterra (55)
Clint Patterson (108)
Cuong Dang (21)
Daniel Bartholomew (2)
Daniel Mettler (181)
Daniel Valadas (48)
Dave Buckner (2)
David Poindexter (12)
David Rodriguez (3)
Dennis Shiao (1)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (80)
Francisco Perez Andres (17)
Geoff Barlow (12)
George Alatrash (12)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (3)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (274)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Kelly Ford (4)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matt Rutledge (2)
Matthias Schlomann (16)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Miguel Gatmaytan (3)
Mike Horton (19)
Mitchel Sellers (40)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Oliver Hine (1)
Patricio F. Salinas (1)
Patrick Ryan (1)
Peter Donker (54)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Sacha Trauwaen (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott Schlesier (11)
Scott Wilkinson (3)
Scott Willhite (97)
Sebastian Leupold (80)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Steven Fisher (1)
Tony Henrich (3)
Torsten Weggen (3)
Tycho de Waard (4)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (40)
Will Strohl (180)
William Severance (5)
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out