Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 Seperate Table columns, to one other table's single column?

Status
Not open for further replies.

MoGryph

Programmer
Nov 1, 2000
99
0
0
US
I'm building a database that has 2 tables - Users, and Groups.

I created the 2 tables, and a 3rd table, for a many-to-many relationship, so that
I can track which Users are in which Groups. However, I want to be able to add a
group to another group. Is this possible?

For instance, what I'm tracking, is NT Admin security.
In NT, you can set up your security groups, placing Users in the group, as well
as other groups within the group.

The Many-To-Many relationship does not seem to suit this, since I have no way of feeding a Group back into the group.

What sort of design would it take to get this functioning?
 
Try with this design

Table Users: Table GroupsUsers: Table Groups:
IdUser IdGroupsUsers |---- IdGroups
UserName IdGroups ---------| GroupName
User (S/N)

Whith the field GroupsUsers.User you know if the field GroupsUsers.IdGroupsUsers is one user or one Group. You can't specify this relationship in the Relationship windows because is with one table or whit the other, but you can do this with program code or with query's.

Do you understand me?? (Sorry, but I don't speak english very well...) My e-mail is: vzudaire@yahoo.com
 
Hi Veronica.

Yeah, your repsonse is a little difficult to understand, but I think I figured it out.

Is the User (S/N) field that you listed, a Boolean (logical) field?
I'm assuming this, and that (S/N) is your language's "Yes/No".

I think I can take it from there. I was thinking of useing a method like that, but was just hopeing that there was an easier way of handling it.
Thanks for the response though.
 
I'm sorry, the User field is a boolean field, but I write that in my language. I don't now a better form to do this, but, if you find another one, please tell me.

Greetings, Verónica My e-mail is: vzudaire@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top