Results 1 to 9 of 9
  1. #1
    Full Member
    Join Date
    January 16th, 2006
    Posts
    447
    Question Database and Datafeed Question
    Hi, I have a datafeed from a shoe store. One of the columns in my database is for the various categories of shoes. For example:


    Kids:Boys Collection:Children Boys Collection:Children Boys Athletic:Athletic - Cross training

    Is this all in one record (in this column) because it is a snapshot of data sent to me, so I would know how to categorize the item? In reality is their database comprised of these categories and subcategories in several related tables? (instead of all in this one column)

    Thanks. I am finding the best way to handle using this data is to separate this back out into either some self foreign key or separate tables related to one another, so I can create a hierachy or related pages or breadcrumbs.

  2. #2
    Member
    Join Date
    April 11th, 2006
    Location
    Michigan
    Posts
    70
    I would suggest that you can use explode function in php to separate these text and create subcategory for each text. Each text is the subcategory of the parent Category. Then insert individual text in separate columns in the product table.
    Burhan Tanweer
    Marketing Manager
    sales/at/awebhosts.com
    [URL=http://www.awebhosts.com]www.awebhosts.com [/URL]

  3. #3
    Animal Lover
    Join Date
    January 18th, 2005
    Location
    oz
    Posts
    1,210
    I would suggest that you can use explode function in php to separate these text and create subcategory for each text. Each text is the subcategory of the parent Category. Then insert individual text in separate columns in the product table
    That's how I'd do it...

    Oscar
    My DataFeed Scripts - php datafeed scripts for your site
    Shareasale datafeed scripts - to display Shareasale datafeeds
    Linkshare datafeed scripts - for multiple Linkshare merchants

  4. #4
    Full Member
    Join Date
    January 16th, 2006
    Posts
    447
    Quote Originally Posted by csearch
    I would suggest that you can use explode function in php to separate these text and create subcategory for each text. Each text is the subcategory of the parent Category. Then insert individual text in separate columns in the product table.
    But some of them have different levels of subcategories. So some might have three and other six and some maybe more. How would I ever know how many extra columns to have in my product table?

  5. #5
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    Quote Originally Posted by johnnyWebAffiliate
    But some of them have different levels of subcategories. So some might have three and other six and some maybe more. How would I ever know how many extra columns to have in my product table?
    My categories only go about 5 levels deep. I maintain my own category structure and map the datafeed categories to my own. This takes a little ingenuity, but it's really the only way to go when dealing with multiple datafeeds and multiple category structures.

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

  6. #6
    Full Member
    Join Date
    January 16th, 2006
    Posts
    447
    Quote Originally Posted by Snib
    My categories only go about 5 levels deep. I maintain my own category structure and map the datafeed categories to my own. This takes a little ingenuity, but it's really the only way to go when dealing with multiple datafeeds and multiple category structures.

    - Scott
    Do you have them in a table hierachy or in the same table as the others suggested above? Thanks again.

  7. #7
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    Quote Originally Posted by johnnyWebAffiliate
    Do you have them in a table hierachy or in the same table as the others suggested above? Thanks again.
    I have a table that contains each category name and their parent id. Each category has a cat_id and every product belongs to a cat_id. Ensuring that every product has a cat_id can be difficult when you're working with multiple datafeeds. I think the biggest challenge here is combining multiple category structures and maintaining order among a majority of the products.

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

  8. #8
    What's the word? Rhia7's Avatar
    Join Date
    January 13th, 2006
    Posts
    9,578
    Quote Originally Posted by Snib
    My categories only go about 5 levels deep. I maintain my own category structure and map the datafeed categories to my own. This takes a little ingenuity, but it's really the only way to go when dealing with multiple datafeeds and multiple category structures.

    - Scott
    Snib, do you use explode function in php?

    I found some information about that in the PHP Programming book I have.
    ~Rhia7 -- Remember the 7
    Twitter me

  9. #9
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    Quote Originally Posted by Rhia7
    Snib, do you use explode function in php?

    I found some information about that in the PHP Programming book I have.
    No, I either use split() or preg_split() because they support regular expressions. explode() is really not all that necessary, but PHP tends to offer multiple functions for the same purpose.

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

  10. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. How to put CJ datafeed into database?
    By oxplode in forum Commission Junction - CJ
    Replies: 0
    Last Post: April 20th, 2014, 03:03 PM
  2. Datafeed database structure
    By doobe01 in forum Programming / Datafeeds / Tools
    Replies: 6
    Last Post: September 8th, 2011, 05:05 PM
  3. So i've got the datafeed into mysql database..
    By chillini in forum Programming / Datafeeds / Tools
    Replies: 10
    Last Post: December 2nd, 2008, 02:06 PM
  4. datafeed transfer into a database
    By tsmgroup2 in forum Programming / Datafeeds / Tools
    Replies: 11
    Last Post: December 10th, 2005, 10:31 PM
  5. datafeed/database manipulation
    By ToughTurkey in forum Programming / Datafeeds / Tools
    Replies: 0
    Last Post: February 25th, 2004, 01:48 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
  •