473,396 Members | 2,154 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,396 software developers and data experts.

normalizing help

I'm almost done working on my relationships and the database groundwork
- I'm stuck on one part.

I have the relationships and tables as shown here:
http://home.hawaii.rr.com/kevlinux/o...ationships.jpg

Now, notice the tblSITELEADERS off to the side. Some contacts are site
leaders, but they're not all the time. I'm trying to figure out best how
to handle them. I had a 1-~ relationship from ContactID to ContactID, but
then realized there's no way to keep track of what events they were site
leaders, and which they weren't.

So, now I'm thinking add a Yes/No to tblEVENTDATA called SiteLeader, and
keep track that way, while only keeping Site Leader data for those
contacts who are site leaders at some point. I could also get rid of one
of the "ID" fields in tblSITELEADER and just make a 1-1 relationship
between it and tblCONTACTS, but then ALL contacts get an entry.

Opinions?
Jan 22 '06 #1
5 1203
What value is contained in tblEVENTDATA.EventSiteLeader?

Jan 22 '06 #2
On Sat, 21 Jan 2006 19:58:15 -0800, Jamey wrote:
What value is contained in tblEVENTDATA.EventSiteLeader?


That's the Yes/No field I was talking about.
Jan 22 '06 #3
Seems like that'll work. You won't need the SiteLeaderID and ContactID
in the SiteLeader table if those two fields contain the same data. I'd
just go with the 1:1 relationship for ContactID in the Contacts and
SiteLeader tables and only track the data as applicable.

If you have similar data in the tblEventData.EventRole field, it may be
useful just to eliminate EventSiteLeader and EventGroupLeader from the
table. That way you'll be tracking those roles with Byte data or
Integer data vice Boolean data, but you could possibly combine 3 fields
to 1 with something like that. I may be misinterpreting EventRole, so
that may not even be something you can do.

Looking over your table layout, you may want to standardize the field
names in related fields (i.e. tblEventType.EventTypeID and
tblEvents.EventType). Hopefully, you aren't storing the
tblEventType.EventType data in the tblEvents.EventType field. If you
are, it may be more human readable in the tables, but you should never
be inputting data directly to tables anyway, and the ID fields will be
more useful in SQL because they are unique IDs on the 1 side of the 1:M
relationship.

Jan 22 '06 #4
On Sat, 21 Jan 2006 20:35:15 -0800, Jamey wrote:
Seems like that'll work. You won't need the SiteLeaderID and ContactID in
the SiteLeader table if those two fields contain the same data. I'd just
go with the 1:1 relationship for ContactID in the Contacts and SiteLeader
tables and only track the data as applicable.
Thanks for your suggestion!

If you have similar data in the tblEventData.EventRole field, it may be
useful just to eliminate EventSiteLeader and EventGroupLeader from the
table. That way you'll be tracking those roles with Byte data or Integer
data vice Boolean data, but you could possibly combine 3 fields to 1 with
something like that. I may be misinterpreting EventRole, so that may not
even be something you can do.

DUH! *smacks forehead* The EventRole field is actually a field pointing to
a ContactType, which is "Site Leader" or some other value. That would
negate the need for a SiteLeader Yes/No field. The GroupLeader is a
Yes/No field telling whether or not the person is a group leader for a
group of people - different from Site Leader. I could probably just add a
field in ContactType for "Group Leader", like I think you're
suggesting, but then if they're a group lead and a site lead, it could get
tricky.

Looking over your table layout, you may want to standardize the field
names in related fields (i.e. tblEventType.EventTypeID and
tblEvents.EventType). Hopefully, you aren't storing the
tblEventType.EventType data in the tblEvents.EventType field. If you
are, it may be more human readable in the tables, but you should never
be inputting data directly to tables anyway, and the ID fields will be
more useful in SQL because they are unique IDs on the 1 side of the 1:M
relationship.


Yes, I need to standardize the naming. As for how I'm storing, everything
I can have in INT data is in INT data as far as I can get it. I'm not
worried about readability in table view, just being able to query the
values and do it right. ;)

Thanks for the pointers,

Kevin
Jan 22 '06 #5
Agree the SiteLeader AND GroupLeader role might get tricky if you ever
have a SiteLead who isn't GroupLead. Don't know if that happens, but it
seems pretty plausible that it does. If that's the case, you've got a
whole different can o' worms that might wind up having a solution like
a GroupsByEvent table, in which case you're fast approaching the
slippery slope of Composite Key indexing vice Primary Key indexing, and
Access doesn't have as good of faculties for handling those.

Jan 22 '06 #6

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

Similar topics

0
by: Evan Escently | last post by:
Hi, I've laid out a _very_ simple database that tracks my artwork the table 'works' looks like: +---------+----------+------------+------------+-------------+ | work_id | title | media ...
3
by: Megan | last post by:
hello everybody- i'm normalizing a database i inherited. i'm breaking up a huge table named case into several smaller tables. i am creating several many to many relationships between the new...
8
by: Richard Hollenbeck | last post by:
I have a recipe database that I've been building but I haven't yet put any of the ingredients in because of a little problem of normalization. If I build a table of ingredients, all the recipes...
2
by: jim_geissman | last post by:
I have this table... CREATE TABLE #Test (ID char(1), Seq int, Ch char(1)) INSERT #Test SELECT 'A',1,'A' INSERT #Test SELECT 'A',2,'B' INSERT #Test SELECT 'A',3,'C' INSERT #Test SELECT...
5
by: imani_technology_spam | last post by:
I re-designed a predecessor's database so that it is more properly normalized. Now, I must migrate the data from the legacy system into the new one. The problem is that one of the tables is a...
0
by: ranis | last post by:
Hello Everyone, Iam working on .adp file on ms sql server. I normalized my database as follows: table 1: Table 2: pk#STD_ID pk# COURSE ...
1
by: Neekos | last post by:
Hey guys, So after some of you (FishVal, Nico, NeoPa) pointed out previously that my tables are not normalized, i've decided to go back to the drawing board, but im not really sure where to start....
1
by: elsa | last post by:
My instructer has given me a backward question to answer!! how can we describe the process of normalization that led to this table to 4NF? wardName ------ staffName---- ...
6
by: Dan Ellis | last post by:
Given some function, f(a, b, c=3), what would be the best way to go about writing a function, g(f, *args, **kwargs), that would return a normalized tuple of arguments that f would receive when...
4
by: Nicodemas | last post by:
Hello, I have run into an issue and need someone to explain a process to me in laymen's terms so I can understand it. I have two tables in MS Access. They are define thus: Table: Products ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.