Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Multiple categories for items

Name: Anonymous 2008-04-20 15:20

i've seen a lot of different solutions for this and i'm wondering what /prog/ uses

when you have items in a database and each item needs to be able to belong to multiple categories, so obviously you have a column for categories, or in some cases even a table in it's own lol, but how do you encode the values of each items parent categories?

i've been leaning mostly towards serializing it but maybe there's a better way that i'm missing

Name: Anonymous 2008-04-20 15:38

Use 12 tables:

- Objects
- Object Managers
- Object - Object Manager relationships
- Customers
- Object - Customer relationships
- Suppliers
- Categories
- Category Factories
- Category Factory - Supplier relationships
- Customer - Supplier relationships
- Strategies
- Object - Strategy relationships

WARNING: This is Enterprise-ready.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List