473,623 Members | 2,433 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1405
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******@NOyah oo.SPAMcom> wrote in message
news:uS******** *****@TK2MSFTNG P15.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
12796
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 received. No biggie, right? Well, here's my problem. I don't know how to tell access to modify everyone's account balance each month. And I can't just always assume that their monthly bill is $16 just because their balance is $16. If I do that...
21
2693
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 table which cotains 600k of records. I've tried copying the database and trying to compact that -doesn't work. I've tried Repair and then compact which also doesn't work. I've tried to create a new database and import the tables but it flakes out...
2
1581
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 another table called Client_1,The question is: 1- How it created? 2- this Why is this table in relationships view and not anywhere else? 3- Is it the same table as client? 4-can I remove One of them?
117
18485
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 elements in the HTML to get everything just right. When you consider the class attribute on the DIV elements, there's not much size savings anymore for using DIV. There are other disadvantages to not using TABLE/TR/TD, such as the lack of ability...
3
536
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 Invoice table where the Customer field is linked (foreign key) to the Customer table. As the application has changed, I now want to introduce the concept of prospects by storing them in a table dedicated to prospects only (no customers). I want...
0
8165
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8670
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8613
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8326
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7150
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6106
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4074
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4164
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1473
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.