in reply to Database Design
in thread Reading data from mySQL into hashes and manipulation of hashes

Neither a perl problem, nor a DBI problem

Remove the options columns, and create a secondary table. This will have 4 columns, and (upto) 6 rows for each entry in the main table.

--
Tommy
Too stupid to live.
Too stubborn to die.

Replies are listed 'Best First'.
Re: Re: Database Design
by lagrenouille (Acolyte) on Aug 30, 2002 at 15:11 UTC
    G'day all

    Would you care to elaborate ?

    ie. What is a secondary table ?
    How is one created ?
    How do you link it to the main database ?
    Or is it not linked and merely referred to ?

    Cheers
    lagrenouille
      What is being suggested by more than one person is to simplify your database by creating another table to your data is more easily obtained. The suggestion given above is a good one and might look like this:

      --------------------------------------------------------- | Table name: polls | --------------------------------------------------------- | poll_no | date_begun | date_ended | begun_by | descrip| --------------------------------------------------------- ------------------------------------------------- | Table name: votes | ------------------------------------------------- | poll_no | option_no | option_text | num_votes | -------------------------------------------------

      Now think about how you'd approach your problem given that you have a more normalized database to work with.

      ~CubicSpline
      "No one tosses a Dwarf!"