Connecting Tech Pros Worldwide Help | Site Map

How to change relationships?

 
LinkBack Thread Tools Search this Thread
  #1  
Old May 29th, 2007, 06:05 PM
adham
Guest
 
Posts: n/a
Default How to change relationships?

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, 06:35 PM
spier
Guest
 
Posts: n/a
Default 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, 07:15 PM
adham
Guest
 
Posts: n/a
Default 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, 07:25 PM
adham
Guest
 
Posts: n/a
Default 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, 07:45 PM
spier
Guest
 
Posts: n/a
Default 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, 07:55 PM
adham
Guest
 
Posts: n/a
Default 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, 07:55 PM
adham
Guest
 
Posts: n/a
Default 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, 02:35 AM
spier
Guest
 
Posts: n/a
Default 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.


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.