i disagree with the first point. adding extra options
(like an MP3 player) will not "break the table" if you
code the system with knowledge of how the underlying
database is set-up.
a friend of mine setup a catalog system this way.
the catalogs would usually have ~5-10 custom options,
so his solution was fast and simple and efficient.
i agree with the second point, that having
hundreds or thousands of options would definately
degrade performance.
> -----Original Message-----
> From: Dave Mariner [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP] [OT-ish] Optional Extras.
>
>
> The problem with doing it this way is that it is not extensible.
> A manufacturer cannot add, say, MP3 players to the list at a later date
> without breaking the car table. Also, in time, there could be quite an
> extensive list of features - which would lead to an inefficient storage
> system.
>
> Dave
> ----- Original Message -----
> From: "..s.c.o.t.t.." <[EMAIL PROTECTED]>
> Subject: RE: [PHP] [OT-ish] Optional Extras.
>
>
> > off the top of my head, you could try using a
> > "lookup table" to define the extra options...
> >
> > ford_spec table:
> > id desc
> > --- -------
> > 1 air conditioning
> > 2 whatever
> >
> > ford_cars table:
> > car extra1 extra2
> > ------ ------- ---------
> > 'contour' 1 0
> > 'probe' 0 1
> >
> > "contour" would have "aircond" but no "whatever"
> > "probe" would have no "aircond" but would have "whatever"
> >
> > so to add more options specific to a manufacturer,
> > you could make an entry into "ford_spec" and then
> > create an "extra3" field in "ford_cars"... this system,
> > at least, would enable you to have as many extras
> > as you wanted for each manufacturer, and have
> > different options available for different manufacturers.
> >
> > i dont know how efficient this would be, and there are
> > probably a bunch of better ways to do it, but i've seen
> > this method used before by someone who developed
> > a batteries catalog and needed to store different
> > manufacturers with different options for their batteries.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]