Arnau wrote:
CREATE TABLE user_groups
(
user_id INT8 REFERENCES users(user_id),
group_id INT8 REFERENCE groups(group_id),
CONSTRAINT pk PRIMARY_KEY ( user_id, group_id)
)
CREATE INDEX idx_user_id ON user_groups( user_id );
The primary key implicitly creates an index on (
Hi Michael,
Michael Glaesemann wrote:
On Jul 6, 2007, at 9:42 , Arnau wrote:
I have the following scenario, I have users and groups where a user
can belong to n groups, and a group can have n users. A user must
belogn at least to a group. So when I delete a group I must check that
there i
On Jul 6, 2007, at 9:42 , Arnau wrote:
I have the following scenario, I have users and groups where a
user can belong to n groups, and a group can have n users. A user
must belogn at least to a group. So when I delete a group I must
check that there isn't any orphan. To do this I have so
Hi all,
I have the following scenario, I have users and groups where a user
can belong to n groups, and a group can have n users. A user must belogn
at least to a group. So when I delete a group I must check that there
isn't any orphan. To do this I have something like that:
CREATE TABLE