in reply to DBD::Pg INSERT enlightenment
I agree that repson has it right, if using a relational database, take advantage of it's strengths and create a second table for the many in your one->many relationship. Then you can take advantage of foreign key restraints which can help keep some rogue code from messing with the relationships, adding descriptions to prod_id's that don't already exist in the parent table.
Another simpler option is to remove the unique restraints on Prod_id and just add multiple rows to the table. you'll get the same data back from a select on prod_id as you would using a join. the downside is space... if that is an issue, then use the two table approach.
so Postgress has an "array" type?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBD::Pg INSERT enlightenment
by penguinfuz (Pilgrim) on Feb 08, 2001 at 08:15 UTC |