Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Database set up

Posted on 2016-07-25
5
Medium Priority
?
105 Views
Last Modified: 2016-07-25
Hello experts.
I need help to setup a part of my database.
I want to store the features of vechicles with main and subcategories and after that show for each vechile-category (car, truck,trailer...) there features.
I m using mysql and coldfusion server language.
Any help?
an example-tree  is below:
screen shot of excel
0
Comment
Question by:Panos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 30

Assisted Solution

by:Olaf Doschke
Olaf Doschke earned 2000 total points
ID: 41727390
I assume you look for ideas on how to model this?

First criticism: If you enumerate "no climatization", you'd also need "no On-board computer", "no CD player", etc. leave that out, if a vehicle has no climatisation a record of that feature will simply not be added.

The schema should avoid features excluding each other, eg a car either has automatic or manual aircondition, but sensors are not excluding cameras and you might have front, rear, or both cemeras. So actually there is not much exclusion.

You'd need a list of features with feature categorization, so there is a categorization tree, which mainly is about interior/exterior and then different system categories like parking system, multimedia, navigation. The leaf nodes are not categories, they are the core features.


TFeatures
id, name, featurecategory

TFeaturecategories
id, name, parentcategory (NULL for root categories)

TVehicleFeatures
id, vehicleid, Featureid

Bye, Olaf.
0
 
LVL 2

Author Comment

by:Panos
ID: 41727498
Hi.
Thank you for your post.
Can you please explain your last line:
The leaf nodes are not categories, they are the core features
0
 
LVL 30

Accepted Solution

by:
Olaf Doschke earned 2000 total points
ID: 41727675
Well, that's like Product Categories and Products. If you build a tree of categories, the products sort in as leaf nodes in this tree, they belong to the tree, if you like, but they are products and not product categories.

Likewise you have a list of features (=products) and feature categories (=product categories). It is good practice to keep these separate.

Bye, Olaf.

Edit: A littel fix on my propose TFeatures table:
id, name, featurecategoryid

So a feature should be assigned to some featurecategory on the outmost leaf levels of categories. It thereby also is a feature in the category of parent and parentparent featurecategories, etc.

So eg the feature "Front Parking Sensor" is a feature of the Featurecategoiy Parking Sensors. Parking Sensors are an Interior Feature (according to your tree). I'd not consider "Front Parking Sensors" a feature category, as there are no further categories like Left and Right Front Parking Sensors, you can assign this feature to a certain make/model of a specific sensor, therefore it's a feature and not a feature category anymore.

You might only think of the concrete sensors and other devices/modules to be at the leafe nodes of this feature tree, that may also work.
0
 
LVL 2

Author Comment

by:Panos
ID: 41727837
Thank you very much
0
 
LVL 2

Author Closing Comment

by:Panos
ID: 41727846
Thank you
Regards
Panos
0

Featured Post

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question