• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

categories

I'm building an app for classified advertising.

The way I was keeping categories was to put the categories in a database in the following format

categories

category_id (int-identity-pk)
category_name (varchar-25)
parent_id (int)
status (varchar-16)

This seems to work very well. This allows for multiple tiers of categories. Since each category can be the parent of another, and if it is the root category, just leave the parent_id null.

However, to supplement listings, I also want to import listings from oodle.com. They have a huge database. The problem is, besides their category format, some of their categories aren't very specific. And part of what I am doing with my site is specific/detailed.

For instance, I have about 12 categories underneath the parent of "airplanes". Oodle only has a single category for airplanes. Same thing goes for Heavy equipment.

Anyways, regardless of that, their format for category structure is completely different.

http://developer.oodle.com/categories-list

The present their categories as 'url' and 'title'. Here is an example from their xml category list

<category url="vehicle/commercial_truck/auto_carrier" name="Auto Carrier Trucks" />

I'm struggling to see which is a better method. And how I can make the two play together. ANybody here have experience dealing with categories? Should I be bending my structure to theirs, or vice versa.
 
There is no correct answer to your question. The level of detail is arbitrary and should be driven by the needs of your system. It should also be flexible so that you can add and remove categories, change them, and move listings between categories.

As for the import, if you want to import from their information space into your own then you'll have to write some code to translate. For example if you have twelve categories for planes and they have one, and you don't want to hand-categeorize their listings, then you have no choice but to either dump them all in a default category or try to write some code that can do the classification for you.
 
Well, I was pretty much thinking of creating a table based on their categories, and then assigning a"matching" id from my table to theirs.

For instance, if Aircraft has ID of 56, and I have 12 subcategories that list Aircraft as their parent ID, yet they only have a single aircraft category, I could either put the catID for the sole oodle aircraft category as another column in my category table, or vice versa in theres.

That way, for those more specific aircraft categories, like "bi planes" they would just have the same sole category ID from oodle as the other aircraft categories.
 
Back
Top