473,395 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

table relationships

I'm trying to normalize my database the best I can this time around and I'm
running into some trouble. I've been avoid normalizing for a long time now
because while I know how to normalize, I'm weak on SQL strings so populating
the database is a pain in the kee... but this is another story...

ok, first of all is this a many to many or no?

projMain (table)
projID (PK)
clientID (FK)
etc.........

ProjWebs (table)
webID (PK)
projID (FK)
stageID (FK) ***

SDLC (table)
stageID (PK) ***
stageName
stageDescr

*** is this a many to many relationship? Rather than hard coding SDLC info
I'm putting it into a table. Since many of the records in ProjWebs can
relate to many in SDLC and visa versa, this is many to many, yes? If so,
how can I create One to Many without make a seperate table for ALL SDLC
stages?

cOnFuSeD!!!

Thanks!
Jul 22 '05 #1
2 1395
John wrote:
I'm trying to normalize my database the best I can this time around
and I'm running into some trouble. I've been avoid normalizing for a
long time now because while I know how to normalize, I'm weak on SQL
strings so populating the database is a pain in the kee... but this
is another story...

ok, first of all is this a many to many or no?

projMain (table)
projID (PK)
clientID (FK)
etc.........

ProjWebs (table)
webID (PK)
projID (FK)
stageID (FK) ***

SDLC (table)
stageID (PK) ***
stageName
stageDescr
*** is this a many to many relationship?
The asterisked relationship is a one-to-many relationship. The entire
3-table structure is a many-to-many relationship between projMain and SDLC.
A many-to-many relationship consists of two one-to-many relationships
combined via a "bridge" table.

Rather than hard coding
SDLC info I'm putting it into a table. Since many of the records in
ProjWebs can relate to many in SDLC and visa versa, this is many to
many, yes? If so, how can I create One to Many without make a
seperate table for ALL SDLC stages?


You can't. The only way to implement a many-to-many relationship is to use a
bridge table. From what you are saying, it sounds as if it's the right thing
to do. Don't shy away because it's a little work. :-)
projMain (table)
projID (PK)
clientID (FK)
etc.........

ProjWebs (table)
webID (PK)
projID (FK)

WebStage (table)
webID (PK)(FK)
stageID (PK)(FK)

SDLC (table)
stageID (PK)
stageName
stageDescr

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.
Jul 22 '05 #2
oh man, my SQL chops are about to get spanked. I have no idea how I'm going
to write strings or procedures for all this, wow. Well, I'll be back with
more questions I guess ;-P

Any recommendations for a solid SQL instruction-guide book? I have to get
better chops. Been cruising Amazon and SQL in a Nutshell "second edition"
( I guess the first was just so-so) looked fairly complete concise. Anyone
agree/disagree? Looks like I'm going to have to become "Captian
Join-Master".

Thanks!

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:uS*************@TK2MSFTNGP15.phx.gbl...
John wrote:
I'm trying to normalize my database the best I can this time around
and I'm running into some trouble. I've been avoid normalizing for a
long time now because while I know how to normalize, I'm weak on SQL
strings so populating the database is a pain in the kee... but this
is another story...

ok, first of all is this a many to many or no?

projMain (table)
projID (PK)
clientID (FK)
etc.........

ProjWebs (table)
webID (PK)
projID (FK)
stageID (FK) ***

SDLC (table)
stageID (PK) ***
stageName
stageDescr

*** is this a many to many relationship?


The asterisked relationship is a one-to-many relationship. The entire
3-table structure is a many-to-many relationship between projMain and

SDLC. A many-to-many relationship consists of two one-to-many relationships
combined via a "bridge" table.

Rather than hard coding
SDLC info I'm putting it into a table. Since many of the records in
ProjWebs can relate to many in SDLC and visa versa, this is many to
many, yes? If so, how can I create One to Many without make a
seperate table for ALL SDLC stages?
You can't. The only way to implement a many-to-many relationship is to use

a bridge table. From what you are saying, it sounds as if it's the right thing to do. Don't shy away because it's a little work. :-)
projMain (table)
projID (PK)
clientID (FK)
etc.........

ProjWebs (table)
webID (PK)
projID (FK)

WebStage (table)
webID (PK)(FK)
stageID (PK)(FK)

SDLC (table)
stageID (PK)
stageName
stageDescr

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.

Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Jeremy Weiss | last post by:
I'm trying to build a database that will handle the monthly billing needs of a small company. I'm charting everything out and here's what I see: table for customers sub table to track payments...
21
by: Dan | last post by:
Hi, just ran into my first instance of a backend Access97 database not compacting. I'm getting the "MSACCESS.EXE has generated errors.." message on compact. I've narrowed it down to the largest...
2
by: Hi5 | last post by:
Hi, I am working on a project in access 2000, Whilst I already have a table called client and seems to be related with other tables ,I tried making TBL client as lookup too, I ended up having...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
3
by: anjee | last post by:
Hello, Is it possible to create multiple foreign keys on a field in a table from values in two separate tables where the field value can be from one table OR the other? For example, I have an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.