Thanks for the input! I do have one question regarding the
implementation of looking up the new table. So I made a listbox that
contains the possible options one can select. Using the multi-select
feature, I'm able to determine which option has been selected. Now
that I have this, how do I go about actually finding the corresponding
model number? I know how to do this if the Options were fields in a
table but in this new top-down structure, I'm kinda lost. My initial
thought was to go through the list in a loop and compare each model
type's options to the selected options in the listbox but I think I'm
still not thinking in terms of databases and queries. Is there a way
to make a SQL statement to compare the options automatically? Thanks.
Rich P wrote:
Quote:
greetings,
>
The first recommendation I would make is to change the design of your
table to something like this:
>
Equipment Option YesNo
model1 option1 yes
model1 option2 no
model1 option3 yes
model2 option4 no
model2 option3 yes
model2 option5 no
..
>
A cardinal rule that is written in stone and in every developer's
handbook is that if you have to keep adding columns to a table after it
is in production - the table was designed incorrectly. The process of
designing the table in the correct manner is called normalization. And
the result of an improperly designed table is that it becomes very
difficult to query it for useful information and very difficult to
mainain thus making an application unscalable.
>
With the desing above you can add as many options as you want without
have to alter the design of the table. So the trick is to design your
tables so that they do not require altering after they are in
production. If you know that you will have to alter the table down the
road, then you need to rethink the design so that you don't have to
alter it. More times than not - this is not easy. But if the goal is
to design a real application for business - which would require table
relationships - without proper design - normalization - it will be
almost impossible to add relationships, and all you get (I say this
respectfully) is an amateur effor that is very limited in what it can
do. Just remember that the tables of a Database application are the
backbone of that application.
>
Rich
>
*** Sent via Developersdex
http://www.developersdex.com ***