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.
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.