Re: Need help with creating a "look-up" table in MySQL
Posted by: Chris Bassett
Date: September 06, 2013 08:50AM

Is this a feasible method for when you could have varying combinations of custom fields to meet certain criteria?

Let's use this an example:

For Product "X" to fit Device "A",
Custom Field #1 must equal 1
Custom Field #2 cannot be 0
Custom Field #4 can have the value "SL" or "LL"

For Product "Y" to fit Device "A"
Custom Field #1 cannot be equal to 1
Custom Field #2 must be 0
Custom Field #3 must be 1

In the example above, there are a number of conditions that must be met for certain products to fit certain devices. Mathematically, this would result in several rows being required for each product/device pair.

Is there any other possible way to do this (either through more tables)?

I'm trying to keep it as simple as possible (at least, minimizing the number of rows each table must have... I don't mind having several tables to accomplish this, I just don't want to have to have a dozen rows per product or device, resulting in thousands of rows that need parsing...)

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.