Re: sql (Stored procedure) design question
От | Tino Wildenhain |
---|---|
Тема | Re: sql (Stored procedure) design question |
Дата | |
Msg-id | 43C66FD7.7040907@wildenhain.de обсуждение исходный текст |
Ответ на | Re: sql (Stored procedure) design question (Assad Jarrahian <jarraa@gmail.com>) |
Ответы |
Re: sql (Stored procedure) design question
|
Список | pgsql-general |
Assad Jarrahian schrieb: > Tino, thanks for your response > >>Your schema could rather look like this: >> >>documentid,username,groupname (as real fields) >> > > > Okay, so a typical document can be addressed to any number of users/groups. so > according to an example with the to field = 'jarraa, postgres, keith', > some rows could be like > > (1, jarraa, ) > (1, , postgres) > (1, keith, ) > No, it would look like this: (1,'jarraa','postgres','keith') to match your original schema. But it really depends on what you want to solve here. What data exactly do you have and how do you want to look for data? I mean, what are the keys? Do you have a specific "group" and want to see all "docs" for that group? And then you have a user and want to see all "docs" for this user? Or is it the other way round and you have a "doc" and want to see responsible users and/or groups? And are groups independend from users? Or are users always in one or many groups? ...
В списке pgsql-general по дате отправления: