Results 1 to 6 of 6

Thread: grouping user

  1. #1
    Join Date
    Feb 2009
    Posts
    48

    Post Unanswered: grouping user

    hi can i make group of users?

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Code:
    CREATE TABLE user_account
    (
      user_id INTEGER NOT NULL PRIMARY KEY,
      username VARCHAR(50) NOT NULL
    )
    ;
    
    CREATE TABLE user_group
    (
      group_id INTEGER NOT NULL PRIMARY KEY,
      group_name VARCHAR(50) NOT NULL
    );
    
    CREATE TABLE user_group_membership
    (
       user_id INTEGER NOT NULL,  
       group_id INTEGER NOT NULL,
       FOREIGN KEY (user_id) REFERENCES user_account(user_id),
       FOREIGN KEY (group_id) REFERENCES user_group(group_id),
       PRIMARY KEY (user_id, group_id)
    );

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Well, the most obvious groups are male and female. Later you can further distinguish taller from smaller, brown-eyed-girls from the others, group smokers and non-smokers, etc.

  4. #4
    Join Date
    Feb 2009
    Posts
    48
    very funny little foot bt i actually i want to group of users and then i may assign a single previlge to that group

  5. #5
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by unforgotton_man View Post
    very funny little foot bt i actually i want to group of users and then i may assign a single previlge to that group
    If you post sensible and detailed questions, you'll get sensible and detailed answers.

    Post the DDL of your tables
    Post sample data (as INSERT statements) of your tables
    Post the expected outcome of anything you want to achieve

  6. #6
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I'm glad you understood that I was just kidding

    The truth is: I didn't understand the question, but now I *think* I do.

    Oracle Virtual Manager offers groups of users; see Managing Users and Groups.

    If this is not what you are looking for, I must admit that I wouldn't know how to "group users" in an Oracle database. Though, a role might help. You'd create as many users as you want. You'd also create several roles (for example, those that can only select data, those that can update certain tables, etc.), grant required privileges to roles and - finally - grant roles to users.

    I guess that it isn't exactly what you have on mind, but ... that's about all I can think of.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •