A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Help... .. Deciding one to many or many to many.. Type..



 
 
Thread Tools Display Modes
  #1  
Old April 25th, 2010, 11:25 PM posted to microsoft.public.access.tablesdbdesign
Ahmed
external usenet poster
 
Posts: 2
Default Help... .. Deciding one to many or many to many.. Type..

Hi,
I am learning in Access 2007.... Through John and Jeff Book......Have
two tables.... e.g. 1. AllItems 2. ItemsCategories
Both has Primary keys .... If Items would be in one of categories..
ItemsCategories Key Would GO in
AllItems as Fk... But.. in Future... if Some items belong to more than one
category then
it would rewuire a Juctional table (e.g. ItemsNCategories)...
Should I make Juctional Table (for unknown Future addition convinience) or
Just use one to many
Relationship... Will it hurt to make juctional Table and Procede.. ?

Second question is.. Should Catagories be added .. Through form Direstly
binding table or Should
Create Query of Table categories and Bind Query to Form..

Many thanks In Advance.. Though very basic question .. will appreciate..
help.

Thanks. Ahmed

  #2  
Old April 26th, 2010, 01:43 AM posted to microsoft.public.access.tablesdbdesign
Steve[_77_]
external usenet poster
 
Posts: 1,017
Default Help... .. Deciding one to many or many to many.. Type..

Hello Ahmed,

It won't hurt a thing to create a junction table now. In fact it is
recommended that you do. If there is the remotest possibility that an item
will belong to more than one category, you have a one-to-many relationship
and need the junction table. Your tables should look like:

TblItem
ItemID
ItemName
other item fields as needed

TblCategory
CategoryID
Category

TblItemCategory
ItemCategoryID
ItemID
CategoryID

You can use a form/subform to enter/edit/delete data. Base the main form on
TblItem and base the subform on TblItemCategory. Set the Link Master and
Link Child properties to ItemID. Use a combobox to enter CategoryID in the
subform. Set the rowsource of the combobox to TblCategory. Set the Bound
Column property to 1, Column Count to 2 and Column Width to 0;2.

If you need one-to-one help, I can help you for a small fee. Contact me.

Steve



"Ahmed" wrote in message
...
Hi,
I am learning in Access 2007.... Through John and Jeff Book......Have
two tables.... e.g. 1. AllItems 2. ItemsCategories
Both has Primary keys .... If Items would be in one of categories..
ItemsCategories Key Would GO in
AllItems as Fk... But.. in Future... if Some items belong to more than one
category then
it would rewuire a Juctional table (e.g. ItemsNCategories)...
Should I make Juctional Table (for unknown Future addition convinience) or
Just use one to many
Relationship... Will it hurt to make juctional Table and Procede.. ?

Second question is.. Should Catagories be added .. Through form Direstly
binding table or Should
Create Query of Table categories and Bind Query to Form..

Many thanks In Advance.. Though very basic question .. will appreciate..
help.

Thanks. Ahmed



  #3  
Old April 26th, 2010, 01:18 PM posted to microsoft.public.access.tablesdbdesign
Stop$teve
external usenet poster
 
Posts: 76
Default Help... .. Deciding one to many or many to many.. Type..


"Steve" schreef in bericht ...
Hello Ahmed,

It won't hurt a thing to create a junction table now. In fact it is recommended that you do. If there is the remotest possibility
that an item will belong to more than one category, you have a one-to-many relationship and need the junction table. Your tables
should look like:

TblItem
ItemID
ItemName
other item fields as needed

TblCategory
CategoryID
Category

TblItemCategory
ItemCategoryID
ItemID
CategoryID

You can use a form/subform to enter/edit/delete data. Base the main form on TblItem and base the subform on TblItemCategory. Set
the Link Master and Link Child properties to ItemID. Use a combobox to enter CategoryID in the subform. Set the rowsource of the
combobox to TblCategory. Set the Bound Column property to 1, Column Count to 2 and Column Width to 0;2.

If you need one-to-one help, I can help you for a small fee. Contact me.




You are sooo pathetic !!! Arghhhh!!!

--
Get lost $teve. Go away... far away....

Again... Get lost $teve. Go away... far away....
No-one wants you here... no-one needs you here...

This newsgroup is meant for FREE help..
No-one wants you here... no-one needs you here...
OP look at http://home.tiscali.nl/arracom/whoissteve.html
(Website has been updated and has a new 'look'... we have passed 12.000 pageloads... it's a shame !!)

Arno R


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:00 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.