I have tables set up for this like this.
tbl_car
CarID
CarName
tbl_Category
CategoryID
CategoryName
tbl_parts
PartID
CarID
CategoryID
PartNumber
PartDescription
Engine
Image
ETC ETC ETC.
The trouble im having is with what I think is a many to many relationship.
For the most part one part will only relate to one car / category but there are a few exception parts for instance Air freshener. That will fit all cars and the customer im doing the site for wants that to be returned when a user searches for ALL 240SX as well as be returned when a user searches for all 300zx parts ....( I have drop down menus set-up for the search)
I need a solid design solution for an auto parts database that would have many to many relationships to avoid problems like this ... If it means re-writing the whole database so be it ... but I need to get this worked out.
What would be the layout of an auto parts database where ONE PART could relate to many cars, and One Car could have many parts, and One Car could have many engines
I hope this makes enough sense and that someone can offer a few solutions .....
thanks in advance
Mike
tbl_car
CarID
CarName
tbl_Category
CategoryID
CategoryName
tbl_parts
PartID
CarID
CategoryID
PartNumber
PartDescription
Engine
Image
ETC ETC ETC.
The trouble im having is with what I think is a many to many relationship.
For the most part one part will only relate to one car / category but there are a few exception parts for instance Air freshener. That will fit all cars and the customer im doing the site for wants that to be returned when a user searches for ALL 240SX as well as be returned when a user searches for all 300zx parts ....( I have drop down menus set-up for the search)
I need a solid design solution for an auto parts database that would have many to many relationships to avoid problems like this ... If it means re-writing the whole database so be it ... but I need to get this worked out.
What would be the layout of an auto parts database where ONE PART could relate to many cars, and One Car could have many parts, and One Car could have many engines
I hope this makes enough sense and that someone can offer a few solutions .....
thanks in advance
Mike