Connecting Tech Pros Worldwide Help | Site Map

How to change relationships?

  #1  
Old May 29th, 2007, 07:05 PM
adham
Guest
 
Posts: n/a
Hey there,

I was wondering if it was possible that anyone could please help me.

I have two tables, one is the main table (GeneralInformation) with two
ID fields, a websiteID (primary key) and a supplierID. In the second
table (SupplierInformation) i have one ID field, supplierID, which is
the primary key. The format of the database is that each website can
have many suppliers, so a 1 to many relationship, but it only seems to
work the other way round.

Can someone please help me out with this?

Regards
Adham

  #2  
Old May 29th, 2007, 07:35 PM
spier
Guest
 
Posts: n/a

re: How to change relationships?


On May 29, 3:00 pm, adham <adhamsel...@yahoo.comwrote:
Quote:
Hey there,
>
I was wondering if it was possible that anyone could please help me.
>
I have two tables, one is the main table (GeneralInformation) with two
ID fields, a websiteID (primary key) and a supplierID. In the second
table (SupplierInformation) i have one ID field, supplierID, which is
the primary key. The format of the database is that each website can
have many suppliers, so a 1 to many relationship, but it only seems to
work the other way round.
>
Can someone please help me out with this?
>
Regards
Adham
In relational design, the basic rule is: children knows their parent.
Thus, SupplierInformation should have a websiteID foreign key, meaning
that the current supplier participate in the website referenced by
websiteID column.

Now, if a supplier may participate in more websites, an extra table
relating websites with suppliers should be created, e.g.
WebsiteSuppliers( websiteID, supplierID), setting both columns as the
primary key.

As you may have realized, MS-Access is far easier than English ;)

  #3  
Old May 29th, 2007, 08:15 PM
adham
Guest
 
Posts: n/a

re: How to change relationships?


On May 29, 11:27 am, spier <spie...@yahoo.comwrote:
Quote:
On May 29, 3:00 pm, adham <adhamsel...@yahoo.comwrote:
>
Quote:
Hey there,
>
Quote:
I was wondering if it was possible that anyone could please help me.
>
Quote:
I have two tables, one is the main table (GeneralInformation) with two
ID fields, a websiteID (primary key) and a supplierID. In the second
table (SupplierInformation) i have one ID field, supplierID, which is
the primary key. The format of the database is that each website can
have many suppliers, so a 1 to many relationship, but it only seems to
work the other way round.
>
Quote:
Can someone please help me out with this?
>
Quote:
Regards
Adham
>
In relational design, the basic rule is: children knows their parent.
Thus, SupplierInformation should have a websiteID foreign key, meaning
that the current supplier participate in the website referenced by
websiteID column.
>
Now, if a supplier may participate in more websites, an extra table
relating websites with suppliers should be created, e.g.
WebsiteSuppliers( websiteID, supplierID), setting both columns as the
primary key.
>
As you may have realized, MS-Access is far easier than English ;)
Yes it is unfortunatly.

Ok let me rephrase, why the F*&% does access pick its own
relationships (1 to 1 or 1 to many etc), and is there a way that i can
decide that (which relationship should exist between tables), seeing
that i am the person creating the database.

Thanks
Adham

  #4  
Old May 29th, 2007, 08:25 PM
adham
Guest
 
Posts: n/a

re: How to change relationships?


On May 29, 12:06 pm, adham <adhamsel...@yahoo.comwrote:
Quote:
On May 29, 11:27 am, spier <spie...@yahoo.comwrote:
>
>
>
>
>
Quote:
On May 29, 3:00 pm, adham <adhamsel...@yahoo.comwrote:
>
Quote:
Quote:
Hey there,
>
Quote:
Quote:
I was wondering if it was possible that anyone could please help me.
>
Quote:
Quote:
I have two tables, one is the main table (GeneralInformation) with two
ID fields, a websiteID (primary key) and a supplierID. In the second
table (SupplierInformation) i have one ID field, supplierID, which is
the primary key. The format of the database is that each website can
have many suppliers, so a 1 to many relationship, but it only seems to
work the other way round.
>
Quote:
Quote:
Can someone please help me out with this?
>
Quote:
Quote:
Regards
Adham
>
Quote:
In relational design, the basic rule is: children knows their parent.
Thus, SupplierInformation should have a websiteID foreign key, meaning
that the current supplier participate in the website referenced by
websiteID column.
>
Quote:
Now, if a supplier may participate in more websites, an extra table
relating websites with suppliers should be created, e.g.
WebsiteSuppliers( websiteID, supplierID), setting both columns as the
primary key.
>
Quote:
As you may have realized, MS-Access is far easier than English ;)
>
Yes it is unfortunatly.
>
Ok let me rephrase, why the F*&% does access pick its own
relationships (1 to 1 or 1 to many etc), and is there a way that i can
decide that (which relationship should exist between tables), seeing
that i am the person creating the database.
>
Thanks
Adham- Hide quoted text -
>
- Show quoted text -
Thats alright, i just figured it out. You have to specify the correct
indexing conditions. im such an idiot.

thanks for helping out.

regrads
adham

  #5  
Old May 29th, 2007, 08:45 PM
spier
Guest
 
Posts: n/a

re: How to change relationships?


Quote:
>
Quote:
As you may have realized, MS-Access is far easier than English ;)
>
Yes it is unfortunatly.
Well, as a foreign, I was telling about my english ...
Quote:
>
Ok let me rephrase, why the F*&% does access pick its own
relationships (1 to 1 or 1 to many etc), and is there a way that i can
decide that (which relationship should exist between tables), seeing
that i am the person creating the database.
>
Every time one draw a relation between two primary keys ( and, maybe,
autonumber columns), he/she will get a 1 to 1 relation. Toi create a
foreign key, you have to select a long numeric data type.


  #6  
Old May 29th, 2007, 08:55 PM
adham
Guest
 
Posts: n/a

re: How to change relationships?


On May 29, 12:35 pm, spier <spie...@yahoo.comwrote:
Quote:
Quote:
Quote:
As you may have realized, MS-Access is far easier than English ;)
>
Quote:
Yes it is unfortunatly.
>
Well, as a foreign, I was telling about my english ...
>
>
>
Quote:
Ok let me rephrase, why the F*&% does access pick its own
relationships (1 to 1 or 1 to many etc), and is there a way that i can
decide that (which relationship should exist between tables), seeing
that i am the person creating the database.
>
Every time one draw a relation between two primary keys ( and, maybe,
autonumber columns), he/she will get a 1 to 1 relation. Toi create a
foreign key, you have to select a long numeric data type.
I didnt notice anything about your english. Where are you from
originally?

Just wondering, could you please explain the difference between a
foreign key and a primary key?

Regards
Adham

  #7  
Old May 29th, 2007, 08:55 PM
adham
Guest
 
Posts: n/a

re: How to change relationships?


On May 29, 12:35 pm, spier <spie...@yahoo.comwrote:
Quote:
Quote:
Quote:
As you may have realized, MS-Access is far easier than English ;)
>
Quote:
Yes it is unfortunatly.
>
Well, as a foreign, I was telling about my english ...
>
>
>
Quote:
Ok let me rephrase, why the F*&% does access pick its own
relationships (1 to 1 or 1 to many etc), and is there a way that i can
decide that (which relationship should exist between tables), seeing
that i am the person creating the database.
>
Every time one draw a relation between two primary keys ( and, maybe,
autonumber columns), he/she will get a 1 to 1 relation. Toi create a
foreign key, you have to select a long numeric data type.
I didnt notice anything about your english. Where are you from
originally?

Just wondering, could you please explain the difference between a
foreign key and a primary key?

Regards
Adham

  #8  
Old June 1st, 2007, 03:35 AM
spier
Guest
 
Posts: n/a

re: How to change relationships?


Quote:
>
Quote:
As you may have realized, MS-Access is far easier than English ;)
>
Yes it is unfortunatly.
Well, as a foreign, I was telling about my english ...
Quote:
>
Ok let me rephrase, why the F*&% does access pick its own
relationships (1 to 1 or 1 to many etc), and is there a way that i can
decide that (which relationship should exist between tables), seeing
that i am the person creating the database.
>
Every time one draw a relation between two primary keys ( and, maybe,
autonumber columns), he/she will get a 1 to 1 relation. Toi create a
foreign key, you have to select a long numeric data type.


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help getting values to change in a list box. Richard Penfold answers 12 January 20th, 2009 10:14 PM
How to change the RowSource in a SubForm in VBA code Simon answers 8 August 23rd, 2007 03:15 AM
how to change the relationship between a primary key and foriegn key? adham answers 1 May 30th, 2007 11:35 PM
How to change a NOT NULL column to allow NULLs? Robert Stearns answers 5 November 12th, 2005 09:34 AM