Re: Question regarding keyword checkboxes in database design
От | Bruno Wolff III |
---|---|
Тема | Re: Question regarding keyword checkboxes in database design |
Дата | |
Msg-id | 20030608112236.GB14337@wolff.to обсуждение исходный текст |
Ответ на | Question regarding keyword checkboxes in database design (Lynna Landstreet <lynna@gallery44.org>) |
Список | pgsql-novice |
On Thu, Jun 05, 2003 at 14:00:16 -0400, Lynna Landstreet <lynna@gallery44.org> wrote: > > So I'm thinking that probably each set of keywords (medium, subject, etc.) > probably needs to be a table and each keyword a boolean column within it, > but I'm not sure if there's a way to modify a select statement so that it > outputs the names of all columns with a yes/true/1 in them, rather than > outputting the values themselves. If the keywords are fixed then this is probably what you want to do. If new ones can get added more than once in a great while, then you may want to store the keywords and primary key of the parent record they belong to in a separate table. You can get the names of the columns programatically if you want to try to make the web application relatively immune from changes when a new keyword gets added. How you do this depends on what interface you are using. It should be covered in the documentation for that interface.
В списке pgsql-novice по дате отправления: