Hello!
I know there are some people who like tackling programming and database problems. So here's one that's fun for all the family!
The Problem
Design a database for a category system on an e-commerce site that allows each product to be assigned a core "type" such as Book or DVD which dictates the properties the product has and a set of categories or tags which can be used to populate these properties. Some properties might be allowed to have multiple values. If two categories have the same name but are used in different places they should be treated as the same when filtering by that category.
Types are distinct from categories in that they have hierarchy whilst categories don't and they dictate range of properties whilst categories populate them.
Should be designed to allow it to be easy to add new things and for fairly straightforward queries to get lists of products based on certain properties.
I have a vague idea of how I'd solve this, but I'm looking for other opinions. It's a suprisingly complex problem and I'm hoping someone can figure out how to make it into a simple one.
I know there are some people who like tackling programming and database problems. So here's one that's fun for all the family!
The Problem
Design a database for a category system on an e-commerce site that allows each product to be assigned a core "type" such as Book or DVD which dictates the properties the product has and a set of categories or tags which can be used to populate these properties. Some properties might be allowed to have multiple values. If two categories have the same name but are used in different places they should be treated as the same when filtering by that category.
Types are distinct from categories in that they have hierarchy whilst categories don't and they dictate range of properties whilst categories populate them.
Should be designed to allow it to be easy to add new things and for fairly straightforward queries to get lists of products based on certain properties.
I have a vague idea of how I'd solve this, but I'm looking for other opinions. It's a suprisingly complex problem and I'm hoping someone can figure out how to make it into a simple one.