Solved

Database set up

Posted on 2016-07-25
5
60 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
  • 3
  • 2
5 Comments
 
LVL 29

Assisted Solution

by:Olaf Doschke
Olaf Doschke earned 500 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 29

Accepted Solution

by:
Olaf Doschke earned 500 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Creating and Managing Databases with phpMyAdmin in cPanel.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now