Design help - Newbie

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

Hi

I'm designing a database, but need some help on a design isue.
I have a table with all users in our business, and one table with all our
applications. What I have to do is somehow show all applications a user has
access to. In other words User A has access to application 1, application 2
and applicaton3, but user B has access to application 1 and application 4.
How do I solve this with tables?

/Andy
 
Andy,

You are describing a classic many-to-many relationship between users and
apps. The way to handle this is through a third table, with one field
UserID (foreign key, linked to the Users table) and one field
ApplicationID (foreign key linked to the Applications table).
This table (tblUserApplications, for instance...) will have as many
records per user as the apps the user has, and, at the same time, as
many records per application as the users that use it.
Qurying the table for a particular UserID will give you the answer.

HTH,
Nikos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top