XML Tutorials
  Home arrow XML Tutorials arrow Page 3 - Creating XML Taxonomies
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Mobile Linux 
App Generation ROI 
IBMฎ developerWorks 
Download TestComplete 
Forums Sitemap 
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML TUTORIALS

Creating XML Taxonomies
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-02-11

    Table of Contents:
  • Creating XML Taxonomies
  • What Are Our Needs?
  • Our Parents
  • What's Next?

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Creating XML Taxonomies - Our Parents


    (Page 3 of 4 )

     

    What information might we need for our reports? For starters, let's look at all of the information we can obtain about the objects we are selling, albums. Here is a list of data we could obtain from each: 

    Artist – Who is the album made by/who are the musicians playing on the album?

    Genre – What type of music is it? Is it rock, country, rap?

    Format – Is the album a vinyl album? Is it a CD? Is it a digital format?

    Price – How much does it cost?

    Unique ID – Every album we sell must have a unique key to identify it and ensure there is no duplication. For instance, there may be many albums by the Rolling Stones, and many albums named Tooty Fruity. How do we differentiate them using only one field? A unique key is required. Real world examples of unique keys are social security numbers, bank account numbers, or the ISBN of a book.

    Label – Which record label put out the album?

    Length – How long is the album in terms of minutes?

    Release – When was the album released? 

    We will stop there. As you can see, the list can get out of hand quickly. And that is just a list of categories/parents for the albums. 

    In our taxonomy we will also want to know things about the person buying our albums. We could use the information to send them newsletters, or suggest music based off of previous purchases. It would also help to prevent transaction fraud. Here are some fields of data that we may wish to collect: 

    First Name – The first name of the buyer

    Last Name – The last name of the buyer

    Address – The address of the buyer

    Email – The buyer’s email address

    Phone number – This will act as the user’s unique key. In the grand scheme of things, this could cause problems of course. If more than one person lives in the same house and uses the same number, for instance, or if the person abandons the phone number and someone else picks it up, there could be issues. We might actually want to create a customer number instead, so let’s go ahead and do so.

    CustomerID – a unique number to identify the customer 

    Again, we could have gone crazy and added more fields. Address could have been broken down to State, City, Zip Code, etc, and when developing your own application, you might wish to break it down in this manner. This would give you more of a geographical feel for your customers. If you ever wanted a list of everyone from a certain city for instance, you would need that City field. 

    Lastly, we are going to want to know information about the transaction itself. Here are some fields:  

    Unique ID – This is the same field we used in our first section. We will use it here to tie the album to the sale. 

    Price – How much does it cost? 

    Coupon – Is there a coupon being used or a special sale? 

    Shipping – How much does shipping cost? 

    TotalPrice – What is the total price after coupons/sales and shipping have been calculated? 

    Date – Date the transaction occurred 

    Type – Retail or Internet sale? 

    More XML Tutorials Articles
    More By James Payne


       · Thanks for the great 3 parts so far James. I rated it a 4 star for now as I feel a...
     

    XML TUTORIALS ARTICLES

    - Validation with Document Type Definitions (D...
    - Creating a Well-Formed XML Document
    - Creating XML Taxonomies
    - Getting to Know XML
    - A Friendly Approach to XML
    - Creating RSS 2.0 Feeds
    - Using Modules in Your RSS Feed
    - RSS 2.0
    - Querying XML: Use Cases
    - Joins and Query Use with XML
    - Solving Problems by Querying XML
    - Performing Set Operations When Querying XML
    - Querying XML
    - Handling Data for Ajax with JSON
    - Handling XML Data for Ajax





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek