[thelist] Database Structure Assistance and Populating Options

apatrick at oracular.com apatrick at oracular.com
Tue Sep 19 09:47:48 CDT 2000


=====================================================
======

"Michele Foster" <michele at wordpro.on.ca> wrote:
I have two options I can think of.  I'm really interested in getting
comments about performance and ease of use.  The first option, is to 
pass
the information from the first select box, to the existing page, rewrite
(process) the page, with another drop down box of the second_cat 
items.
Simple enough?  Or am I better to use a JavaScript method to populate 
the
second list?  Alternatively, I could lead users to a second page that will
display the options, though, I'd rather keep the "search" page identical.
Thoughts on this?
=====================================================
=====

In the past I've used a wizard type interface where you pick the first 
value and 
then narrow the second choice down on a second page.  This might be 
a little 
more time consuming but it's easy to program and easy to use and I 
haven't had 
the opportunity to try it another way quite yet.  I'm sure someone else 
has more 
experience here...




=====================================================
====
Now for my second question, with the above scenario, I would think it 
would
be best to use the autogen field to be the identifier........
Now the REAL question, each company can offer more than one service.  
How
should I store this information?.......
=====================================================
====

Consider adding a table with a composite primary key.  

COMPANY number?,
AUTOGEN number,
PK(company, autogen)

then your data would look like this
COMPANY  AUTOGEN
10            10
10            11
10            21
11            5
12            9
12            10

Relational DBs were designed to work this way so the SQL will end up 
being 
easier. 






More information about the thelist mailing list