A typical session of querying a database is as follows:
A product is composed from components. By configuring the
product, you decide how many and which type of each component to
add to that product.
The configuring process consist of choosing the desired type and
quantity for each component, one by one. You do this in the
component form, where after selecting the desired type and
quantity for the current component, you have the following three
buttons available:
The list with the available types for the component also contain the price for each type, to help you to make your option.
The valid values for the quantity in the component form depend on the previous selections.. Some particular cases:
The databases must be updated by the vendors. The buyers don't have anything to do with this. If you're using FMProdConf only as a buyer, you can skip the documentation about updating databases.
To start updating a database, select the desired
database in the main form, enter the update
password and press the "Update" button.
If the selected database is a demo database (his name start with
"DEMO "), the password field is deactivated and you
don't have to enter any password.
If the password entered is incorrect, you receive an appropriate
message and that's all.
The data composing a database can be divided into four big groups: settings, components, categories and products. So, the update form (shown after you press the "Update" button in the main form) contain four buttons corresponding to these four groups and another two buttons for saving and respectively abandoning the changes. You'll find below four help sections corresponding to these four database sections. But first, you must understand the database structure:
The structure of a database is as follow:
| 1: | database name, such as "PERSONAL COMPUTERS" or "DEMO PC". This name is shown in the databases list and is used for selecting the desired database | ||
| 2: | number of decimals: maximum number of decimal digits allowed in prices. its usual value is 2 but it can also be 0 (especially when instead of US dollars prices are expressed in another currency, with a smaller value and without subdivisions) | ||
| 3: | notes: a string contained miscellaneous notes, such as: delivery terms, date of the last update | ||
| 4: | update password: this is the password needed for updating or removing the database | ||
| 5: | a number of profiles. By defining the profiles, the vendor describe which passwords can be used for querying the database and which price level will see a buyer who started a query using a certain query password. | ||
| A: | factor: used for computing the price presented to a buyer when he make his query. The buyer see the price stored in the database multiplied with this factor. For example, if the price for a component is $15 and the factor is 1.2, the buyer will see the price of that component as$18 (15*1.2) | ||
| B: | query password: this password must be entered by the buyer for obtaining the right to query the database. Each query password has its own factor attached, so that by using another password the buyer will see another prices. | ||
| 6: | a number of components, each component consisting of: | ||
| A: | name: an identificator to be used in expressions (see below). It is only seen by the vendor, who's maintaining the database. The buyer, who's querying the database wouldn't see it. | ||
| B: | description: a string (that's what the buyer see) | ||
| C: | price: the price for that component.It is a reference price used by the vendor (might be the acquisition price). The buyer can't see this price, he only see price * factor | ||
| 7: | a number of categories, used for grouping together components with the same functionality. The grouping of the components in categories simplify the writing of the rules for building the product: because the vendor only has to define rules for each category instead of each component, so the number of rules is significantly decreased. Each category consist of: | ||
| A: | name: see explanations from component name | ||
| B: | description: see explanations from component description | ||
| C: | list with the components belonging to the category | ||
| 8: | a number of products, each product consisting of | ||
| A: | name: see explanations from component name | ||
| B: | description: see explanations from component description | ||
| C: | a number of product
rows, each row describing a category which is to
be (eventually) added to that product. By defining these
rows, the vendor describe the possible configurations of
that product: -the categories in the rows describe which categories of components can be used to build that product -the limiting formulas for each row (expressions for computing the min and max allowable values) describe how many component from that category can be added So, the structure of a row is: |
||
| a: | a category | ||
| b: | min formula: an expression for computing the minimum allowable value | ||
| c: | max formula: an expression for computing the maximum allowable value | ||
When start querying a database, the buyer has to
configure the selected product.
A product is configured by processing all the rows composing it,
one after another. Processing a product row means selecting the
desired component from the category from that product row and
selecting the desired quantity, quantity which must fall between
the minimum and maximum allowable values computed for that row.
NOTE: the results of evaluating the limiting formulas (the
expressions for min and max allowable values) depend on the
selections made by the user on the previous product rows. By
writing these limiting formulas, the database maintainer control
which configurations are allowed and which aren't.
In case that the buyer selected a quantity smaller than the
maximum allowed value for that category, he is asked to select
again from the same category, until the full available quantity
is selected or the buyer select 0, thus telling that it has no
other components to select from that category.
In the Update Settings form, you have to update the following data:
When you finish, you press the button
"done" which bring you back to the update form.
If you enter illegal values in the fields, you receive
appropriate messages for correcting it.
See updating settings above. The idea is the same.
See updating components before. The idea is the
same, except that in addition you have to also specify which
components are members of the selected category.
You do this by selecting and/or deselecting the desired
components in the list with components (all components are shown
in this list). When you press the "update selected
category" button, all the selected components will be added
to the selected category and all the deselected components will
be removed from the selected category.
Things are much like updating categories above, plus the following:
A product doesn't contain directly categories, but instead it contain product rows, and in turn each product row contain a category plus limiting formulas (min and max value). So when you select the desired categories for the selected product and press the "update selected product", you still haven't finished, because you has to enter the limiting formulas associated with each category in the selected product.
For this, in the bottom of the update products form, you have the following items:
The limiting formulas are arithmetical expressions, depending on the categories and components in the previous product rows. This way, when the buyer configure the desired product, the valid choices presented to him at a moment depend on the previous selections made by him, so that the process of configuring the product is controlled by these limiting formulas.
NOTE: for easing the writing of the formulas, when the min and max formulas for a certain category are the same, you may leave the text field for the min formula empty because in this case the program will automatically set for the min formula the same value as for max formula
See the section about limiting formulas below.
The ability to work with symbolic formulas give the strength and flexibility of this application.Maybe that's why understanding how these formulas work may not be very easy. However, after seeing the examples below and trying to create and update your own databases you'll be able to benefit from their power.
A formula consist of operands and operators. The results returned by any operator is an integer value.
There are no logical values (true and false).
Instead, the standard convention from the C programming language
is used:
- instead of a logical operand having the "true" value
may be used any nonnull integer and instead of a logical operand
having the "false" value may be used a null integer
- instead of returning the logical value "true", an
operator will always return the integer value 1 and instead of
returning the logical value "false" the operator will
return the integer value 0.
The available operators are the following, in the decreasing order of their precedence
| ! | negation: !value is evaluated to 1 if value is 0 and 0 otherwise | |
| * / | multiply and divide | |
| + - | plus and minus | |
| < <= > >= | comparison: the return value is 1 if the relation is true and 0 otherwise | |
| == != | equality (a==b return 1 if a and b are equals and 0
otherwise) nonequality (a==b return 0 if a and b are equals and 1 otherwise) |
|
| ?: | conditional expression (a?b:c return c if a is 0 and b otherwise) |
As operands, one can use:
If an component (or category) identificator is used as an operand, its value is the quantity chosen for that component (or category).
Parenthesis "(" and ")" can be used for nesting expressions
Example 1:
if the category named RAM contains the components RAM8, RAM 16
and RAM32 and the buyer choose to put 2 x RAM16 and 2 x RAM 8 in
his computer, then after this we'll have: RAM8=0, RAM16=2,
RAM32=2, RAM=4 (the value for the category is the sum of all the
components selected from that category)
Example2:
If a floppy drive must be added always in any computer
configuration and there's only one model available, the vendor
may arrange things as follow:
- define a component with name= FDD144, description="floppy
drive 1.44MB", price=$16
- define a category with name=FDD, description="floppy
drive" containing only one component (FDD144)
- for the product row containing the category FDD, the vendor
enter the following limiting formulas: 1 for the max value and
nothing (empty field) for the min value (please recall that if
the min formula is empty, the max value will be used for min
too).
Then, when in the query process this product row is reached, the
max and min limiting values are both evaluated to 1, thus giving
only one possible choice for the quantity and the only variant of
"floppy drive" is "floppy drive 1.44MB". So
the buyer will have nothing to chose, the system will
automatically add 1 piece of "floppy drive 1.44MB"
without asking the buyer and will proceed to the next product
row.
Example3:
let suppose that all the available motherboards (category
motherboard) have 2 slots for SDRAM memory modules, with the
exceptions of Gigabyte model (component Gigabyte) which has 4
slots and Via model (component Via) which has only 1 slot. After
choosing the motherboard, the buyer will have to add EDO RAM
memory modules (the category named EDORAM) and then will have to
add SDRAM memory modules. The limiting formulas associated with
the category SDRAM will be:
- min: !EDORAM
- max: 2+2*Gigabyte-Via
Indeed, the minimum number of SDRAM modules may be 0 if some EDO
RAM was previously added (!EDORAM=0) but it must be 1 if EDO RAM
was not added (!EDORAM=1) because the computer need some memory
to work. The max value will be 4 if Gigabyte was selected
(2+2*1-0), 1 if Via was selected (2+2*0-1) and 2 for the rest of
motherboards.
Example4:
To make things even more complicated, let suppose that in the
previous example there's also available a motherboard with VX
chipset (component Vx), which can't use simultaneously both EDO
RAM and SDRAM. Then, the max value for limiting formula for the
category SDRAM became:
- max: (Vx*EDORAM)?0:(2+2*Gigabyte-Via)
Indeed if a VX motherboard was chosen and some EDO RAM was added
on it (Vx*EDORAM is not zero) then the maximum value is 0 (SDRAM
can't be added). Otherwise, the maximum value remain the same as
in the previous example (2+2*Gigabyte-Via)
The parenthesis are used only for clarity, even without them the
expression isn't altered because the priority of the ?: operator
is the smallest
To create a new database press the "Create" button in the main form (the one shown immediately after you start FMProdConf) and then, in the new form shown enter the database name, the update password and press the "Create" button.
If the database name isn't valid, an appropriate message will guide you.
After creating the database, you'll see a message confirming the successful creation.
To remove a database, select the database, enter the update password for that database and press the "Remove" button. Databases with names starting with "DEMO " can't be removed.