Results 1 to 12 of 12
  1. #1
    Affiliate Manager nish's Avatar
    Join Date
    July 6th, 2005
    Posts
    762
    Question product with multiple categories in datafeed
    A single product may be listed under multiple categories. For example, Product-id 10 is listed under multiple categories (Cat-A, Cat-B, Cat-C). In this case, the datafeed can be done in two ways:

    1. Product-id is the key. So only one row for Product-id 10 and the category column has all the categories listed (Cat-A, Cat-B, Cat-C).

    2. Product-id and the Category are the keys. So there will be three rows for Product-id 10. First for Product-id 10 and Cat-A, second for Product-id 10 and Cat-B, and third for Product-id 10 and Cat-C.

    Which do you think would work better for you?

    cheers!
    -nishith

  2. #2
    Not Verif-Lidated infoTim's Avatar
    Join Date
    January 18th, 2005
    Location
    Sunny Florida
    Posts
    1,021
    #1.

    Easy to explode out the categories and add them to the product-to-category mapping table.
    Tim
    consultant by day, affiliate by night

  3. #3
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    I'm with Tim on this. I'd create a mapping table that ties a product ID to any number of category ID's

    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  4. #4
    Affiliate Manager nish's Avatar
    Join Date
    July 6th, 2005
    Posts
    762
    message deleted
    Last edited by nish; October 29th, 2005 at 09:11 PM. Reason: wrong question. Time for a coffee break.

  5. #5
    Member SeanW's Avatar
    Join Date
    July 28th, 2005
    Posts
    69
    Do a search for "third normal form", it's what you want for all your tables.

    Table 1 - product (productid, name, ...)
    Table 2- category (categoryid, name, ...)
    Table 3 - link (linkid, productid, categoryid)

    Sean

  6. #6
    Affiliate Manager nish's Avatar
    Join Date
    July 6th, 2005
    Posts
    762
    Quote Originally Posted by SeanW
    Do a search for "third normal form", it's what you want for all your tables.

    Table 1 - product (productid, name, ...)
    Table 2- category (categoryid, name, ...)
    Table 3 - link (linkid, productid, categoryid)

    Sean
    Yup Sean, thats one way of doing it. Art.com and others do it this way & we certainly can do it as well. But doesn't it make it quite trickly for all the non-database programmers? Other thing is that we don't have tens of thousands of products.

    -nishtih

  7. #7
    Member SeanW's Avatar
    Join Date
    July 28th, 2005
    Posts
    69
    But doesn't it make it quite trickly for all the non-database programmers?
    Non database programmers have no business programming databases

    Sean

  8. #8
    Affiliate Manager nish's Avatar
    Join Date
    July 6th, 2005
    Posts
    762
    hmm.. so should we assume that all affiliates using the datafeeds understand how to program databases? If yes, then your approach certainly is better and a neat one.

    cheers!
    -nishith

  9. #9
    Not Verif-Lidated infoTim's Avatar
    Join Date
    January 18th, 2005
    Location
    Sunny Florida
    Posts
    1,021
    You either have the people who know what they are doing with databases, the people who are using WebMerge, or the people using Golden Can and thinking they have a data feed. :-)
    Tim
    consultant by day, affiliate by night

  10. #10
    Affiliate Manager nish's Avatar
    Join Date
    July 6th, 2005
    Posts
    762
    Quote Originally Posted by infoTim
    You either have the people who know what they are doing with databases, the people who are using WebMerge, or the people using Golden Can and thinking they have a data feed. :-)
    Got it.

    So Tim, should I take it that you too support datafeed in 3NF?

    -nishith

  11. #11
    Not Verif-Lidated infoTim's Avatar
    Join Date
    January 18th, 2005
    Location
    Sunny Florida
    Posts
    1,021
    Yes, 3NF, unless I've had too much coffee, and then it's BCNF.

    But not the feed, the database it goes into.
    Tim
    consultant by day, affiliate by night

  12. #12
    Member
    Join Date
    October 23rd, 2005
    Location
    NYC
    Posts
    65
    Quote Originally Posted by infoTim
    You either have the people who know what they are doing with databases, the people who are using WebMerge, or the people using Golden Can and thinking they have a data feed. :-)
    hmmm...or just hack that datafeed with perl...not so tricky...well, maybe a bit. The more options you add, the crazier you get ;-)

  13. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Products in multiple categories
    By loxly in forum Programming / Datafeeds / Tools
    Replies: 19
    Last Post: January 14th, 2010, 02:29 AM
  2. Images in multiple categories
    By jgoddard in forum WebMerge (Fourthworld.com)
    Replies: 2
    Last Post: September 13th, 2007, 10:32 AM
  3. Sub Categories/ Multiple Merchants
    By zibzer in forum GoldenCAN
    Replies: 3
    Last Post: February 5th, 2006, 02:38 PM
  4. Search and multiple sub categories
    By JoyUnltd in forum GoldenCAN
    Replies: 2
    Last Post: November 26th, 2005, 12:28 PM
  5. Specific categories with multiple merchants
    By westgroup in forum GoldenCAN
    Replies: 3
    Last Post: August 23rd, 2005, 05:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •