Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Many to Many cOnFuSiOn

Reply
Thread Tools

Many to Many cOnFuSiOn

 
 
the other john
Guest
Posts: n/a
 
      02-15-2006
The trouble currently with 3 tables. I'm excluding non-relevant
fields...

tbl_users
PK_user_ID

tbl_developers
PK_developer_ID
FK_developer_user_ID
FK_developer_project_ID

tbl_projects
PK_project_ID


This is an application that manages users with 3 levels of access. All
users are in the users table and their access level is identified
there. The three levels are 1 (admin), 2 (developer), and 3 (client).
Currently my problem is with developers. I originally created the
developers table as a "bridge" table. What's backfiring that
intention is that there could be more than one developer for each
project, creating a many to many. How can I solve this?

Thanks!!

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      02-15-2006
the other john wrote:
> The trouble currently with 3 tables. I'm excluding non-relevant
> fields...
>
> tbl_users
> PK_user_ID
>
> tbl_developers
> PK_developer_ID
> FK_developer_user_ID
> FK_developer_project_ID
>
> tbl_projects
> PK_project_ID
>
>
> This is an application that manages users with 3 levels of access.
> All users are in the users table and their access level is identified
> there. The three levels are 1 (admin), 2 (developer), and 3 (client).
> Currently my problem is with developers. I originally created the
> developers table as a "bridge" table. What's backfiring that
> intention is that there could be more than one developer for each
> project, creating a many to many.


Well, that is the reason for creating a bridge table: to resolve a
many-to-many relationship. Why do you say this is "backfiring"?

> How can I solve this?
>

What do you need to solve?

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
 
 
 
the other john
Guest
Posts: n/a
 
      02-15-2006
The there can be many developers for many projects, I don't know how to
solve this. As I said, I'm confused. Am I making this harder? Am I
not seeing something

 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      02-15-2006
the other john wrote:
> The there can be many developers for many projects, I don't know how
> to solve this. As I said, I'm confused. Am I making this harder?
> Am I not seeing something



I guess so. I'm certainly not seeing something ...

What is the problem? Give us something specific to answer. What immediate
task are you having an issue with?

When you say you don't know how to "solve this", what do you mean by "this"?
I mean: you've got your database correctly designed to model the
many-to-many relationship. So there must be some other task that's confusing
you. What task is that?

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
the other john
Guest
Posts: n/a
 
      02-15-2006
I'm trying to eliminate the many to many relationship. if more than
one developer can be assigned to more than one project that makes the
relationship between the project and developer tables many to many,
true?

 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      02-15-2006
the other john wrote:
> I'm trying to eliminate the many to many relationship. if more than
> one developer can be assigned to more than one project that makes the
> relationship between the project and developer tables many to many,
> true?

True.
Isn't that the correct relationship? Is that the problem? You want to have
only a single developer assigned to a project? If so, change the design to:

tbl_users
PK_user_ID

tbl_developers
PK_developer_ID
FK_developer_user_ID

tbl_projects
PK_project_ID
FK_developer_ID

In this design, tbl_developers is no longer a "bridging" table: it is now a
"subclass" table. And there is now a 1-to-many relationship between
developers and projects

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
the other john
Guest
Posts: n/a
 
      02-15-2006
actually I need there to "potentially" be more than one developer
assigned to a project. that's what's confusing me. If the developer
was unique to the project then this would be easier but with the
"potential" for more than one I don't know how to proceed.

 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      02-15-2006
the other john wrote:
> actually I need there to "potentially" be more than one developer
> assigned to a project.


So you need a many-to-many relationship. Your original design handles
this.What's the problem?

> that's what's confusing me.


I'm sorry, but I just don't understand what's confusing you.

> If the developer
> was unique to the project then this


What do you mean by "this"?

> would be easier but with the
> "potential" for more than one I don't know how to proceed.


You "don't know how to proceed " with what? What is the next task you need
to perform that your confusion is preventing you from performing? Be
specific.

Bob Barrows



--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
the other john
Guest
Posts: n/a
 
      02-15-2006
I must not understand something here because I'm being as specific as I
can. I'm trying to "get rid" of the many-to-many relationship and
create, somehow, a one to many relationship (while still complying with
the "more than one developer" need) as M2M is not RDBM compliant, or in
short, not good.


the other john wrote:
> actually I need there to "potentially" be more than one developer
> assigned to a project.



So you need a many-to-many relationship. Your original design handles
this.What's the problem?


> that's what's confusing me.



I'm sorry, but I just don't understand what's confusing you.


> If the developer
> was unique to the project then this



What do you mean by "this"?


> would be easier but with the
> "potential" for more than one I don't know how to proceed.



You "don't know how to proceed " with what? What is the next task you
need
to perform that your confusion is preventing you from performing? Be
specific.

Bob Barrows


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      02-15-2006
the other john wrote:
> I must not understand something here because I'm being as specific as
> I can. I'm trying to "get rid" of the many-to-many relationship and
> create, somehow, a one to many relationship (while still complying
> with the "more than one developer" need)


You mean like getting a woman "almost pregnant"?
Well that is just not possible. You either have a 1-to-many relationship or
a many-to-many relationship. There is nothing in-between. If a project can
have more than one developer assigned to it, and a developer can be assigned
to multiple projects, then, by definition, you have a many-to-many
relationship. What is the problem?

> as M2M is not RDBM compliant,


Excuse me????
Where in the world did you get this idea? A many-to-many relationship
resolved by a "bridge" or "link" table is certainly "RDBM compliant".
Show me the normalization rule that is broken by a M2M relationship ...

> or in short, not good.


And what is "not good" about it? Using this model, you can easily get a list
of developers assigned to a specific project, right? And it's child's play
to get a list of projects assigned to a specific developer, right? What is
the problem?

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
session vars how many is to many ? =?Utf-8?B?U3R1?= ASP .Net 5 03-05-2005 08:13 PM
Many-to-many relationship / DataSet / child rows / DataRelation / sorting / navigation Marco Ippolito ASP .Net 0 10-11-2004 04:11 PM
Re: Cisco PIX many-to-many NAT problem Fredy Kuenzler Cisco 1 07-16-2004 07:30 PM
Cisco PIX many-to-many NAT problem Fredy Kuenzler Cisco 4 06-15-2004 07:06 PM
How many questions (avg) and How many can i miss? Josh MCSD 2 02-16-2004 07:25 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57