Reputation: 40643
I'm not so familiar with cars and I'm working on a data model to support the various pieces of information relating to cars.
Are factory options such as "sun roof" a property of a "model" or a "trim?" It seems that a model has a finite list of possible factory options, but a trim is defined by the inclusion or exclusion of certain factory options.
I'm trying to understand the relationship of factory options to model and trim -- from a data modeling perspective.
Ideas?
Upvotes: 2
Views: 138
Reputation: 9952
From your description, I think you might need 3 relationships as a minimum:
Assuming I understand your question I suspect both R2 & R3 are necessary rather than either/or:
For example: take the Ford Fiesta (Model) GL (TrimLevel). That comes as standard with alloy wheels (R2) but doesn't include leather interior. However a buyer could, if they so chose, add the leather option. Provided, of course, leather is an available option for the Fiesta (R3).
Where you go from there will really depend on your requirements. You'll probably need some queries over the relationships (e.g. what happens if someone selects an option that's already included in the trim level they've picked?).
You may also need to introduce attributes on the relationships. For example, leather is typically a cost option. On the Fiesta, it might be £1000. On the S-max it's £1200. That means you need to capture price as an extra attribute on R3. Equally, the inclusion of an option in a TrimLevel could be at no cost or a discounted cost. That means an attribute on R2.
In general the relationship complexity will depend on how much you need to represent. It's an interesting problem and can get quite complex. If you're interested you might want to take a look at Feature Modelling. It covers exactly this sort of configuration question in a much broader sense. (otoh, worth saying that you may well not need anything more than the simple 3 relationships above).
hth.
Upvotes: 0
Reputation: 11598
Aren't they a collection of Option on the Model?
The way I see it, having a collection of certain Option with the Model does not indicate a Trim level, but a Trim level always requires Model. Its a one-way relationship, even though there might be some sort of inference you could apply to the Option settings. ie: the Sux 2000 LX model always has a 6-cylinder engine, and the LE doesn't. You could infer that the 6-cylinder engine is the LX model, but that wouldn't hold for all cars.
Upvotes: 0
Reputation: 3166
Personally I would think it's a property of trim. Your model will always be a "2011 Nissan Sentra". Your trim might then be "2011 Nissan Sentra Super Turbo Mode", and then that super turbo mode may or may not include the sunroof property.
Or maybe not, it could make sense that a model supports a sun roof, and therefore every trim can have it if the model supports it. But normally sun roofs can be fitted to cars anyway.
I think you need to dig into the data a bit more to see how it works. But I'm going with trim
Upvotes: 1