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  

Relating Suppliers to Customers through contracts



 
 
Thread Tools Display Modes
  #1  
Old September 22nd, 2008, 04:13 PM posted to microsoft.public.access.tablesdbdesign
CDM
external usenet poster
 
Posts: 38
Default Relating Suppliers to Customers through contracts

I have a table design problem regarding contracts that I'm trying to track.
Each contract may have multiple suppliers and multiple customers. Thus, I've
set up a table for suppliers, customers and contracts. I am supposed to send
a notice to each customer listing the suppliers on the contract. Throughout
the year it is common to have the same suppliers and customers as parties to
mulitple contracts. As you can see, it is the contract that links the parties
together.
Is this a simple one-to-many between tblContracts and tblCustomers and
another one-to-many between tblContracts and tblSuppliers, or am I looking at
creating a couple of many-to-many tables?
  #2  
Old September 22nd, 2008, 04:19 PM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default Relating Suppliers to Customers through contracts

What you have is fine, but it might be simpler if you combined the customers
and suppliers into one table of 'clients.'

You could then create a table with fields:
ContractID relates to the p.k. of your contract table.
ClientID relates to the p.k. of your client table.
RoleID relates to the p.k. of a role table.

The little Role table would have 2 records, for Customer and Supplier. As
you can see, you can now identify multiple companies with one contract,
specifying them as customers or suppliers in one table. Further, when
someone else dreams up another way that clients could be related to the
contract, you can do that just by adding other roles.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"CDM" wrote in message
...
I have a table design problem regarding contracts that I'm trying to track.
Each contract may have multiple suppliers and multiple customers. Thus,
I've
set up a table for suppliers, customers and contracts. I am supposed to
send
a notice to each customer listing the suppliers on the contract.
Throughout
the year it is common to have the same suppliers and customers as parties
to
mulitple contracts. As you can see, it is the contract that links the
parties
together.
Is this a simple one-to-many between tblContracts and tblCustomers and
another one-to-many between tblContracts and tblSuppliers, or am I looking
at
creating a couple of many-to-many tables?


  #3  
Old September 22nd, 2008, 05:10 PM posted to microsoft.public.access.tablesdbdesign
CDM
external usenet poster
 
Posts: 38
Default Relating Suppliers to Customers through contracts

If I set up a role table, when notifying customers would I create a recordset
on clients/contracts with a where clause for role=customer and loop through
another recordset creating notices for related client/contracts whose role
was supplier?

"Allen Browne" wrote:

What you have is fine, but it might be simpler if you combined the customers
and suppliers into one table of 'clients.'

You could then create a table with fields:
ContractID relates to the p.k. of your contract table.
ClientID relates to the p.k. of your client table.
RoleID relates to the p.k. of a role table.

The little Role table would have 2 records, for Customer and Supplier. As
you can see, you can now identify multiple companies with one contract,
specifying them as customers or suppliers in one table. Further, when
someone else dreams up another way that clients could be related to the
contract, you can do that just by adding other roles.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"CDM" wrote in message
...
I have a table design problem regarding contracts that I'm trying to track.
Each contract may have multiple suppliers and multiple customers. Thus,
I've
set up a table for suppliers, customers and contracts. I am supposed to
send
a notice to each customer listing the suppliers on the contract.
Throughout
the year it is common to have the same suppliers and customers as parties
to
mulitple contracts. As you can see, it is the contract that links the
parties
together.
Is this a simple one-to-many between tblContracts and tblCustomers and
another one-to-many between tblContracts and tblSuppliers, or am I looking
at
creating a couple of many-to-many tables?



  #4  
Old September 22nd, 2008, 05:48 PM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default Relating Suppliers to Customers through contracts

You could do that if you want 2 separate lists.

Or you could combine them into one list if that suits your postage costs
better.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"CDM" wrote in message
...
If I set up a role table, when notifying customers would I create a
recordset
on clients/contracts with a where clause for role=customer and loop
through
another recordset creating notices for related client/contracts whose role
was supplier?

"Allen Browne" wrote:

What you have is fine, but it might be simpler if you combined the
customers
and suppliers into one table of 'clients.'

You could then create a table with fields:
ContractID relates to the p.k. of your contract table.
ClientID relates to the p.k. of your client table.
RoleID relates to the p.k. of a role table.

The little Role table would have 2 records, for Customer and Supplier. As
you can see, you can now identify multiple companies with one contract,
specifying them as customers or suppliers in one table. Further, when
someone else dreams up another way that clients could be related to the
contract, you can do that just by adding other roles.


  #5  
Old September 22nd, 2008, 05:57 PM posted to microsoft.public.access.tablesdbdesign
CDM
external usenet poster
 
Posts: 38
Default Relating Suppliers to Customers through contracts

Many thanks!

"Allen Browne" wrote:

You could do that if you want 2 separate lists.

Or you could combine them into one list if that suits your postage costs
better.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"CDM" wrote in message
...
If I set up a role table, when notifying customers would I create a
recordset
on clients/contracts with a where clause for role=customer and loop
through
another recordset creating notices for related client/contracts whose role
was supplier?

"Allen Browne" wrote:

What you have is fine, but it might be simpler if you combined the
customers
and suppliers into one table of 'clients.'

You could then create a table with fields:
ContractID relates to the p.k. of your contract table.
ClientID relates to the p.k. of your client table.
RoleID relates to the p.k. of a role table.

The little Role table would have 2 records, for Customer and Supplier. As
you can see, you can now identify multiple companies with one contract,
specifying them as customers or suppliers in one table. Further, when
someone else dreams up another way that clients could be related to the
contract, you can do that just by adding other roles.



 




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 08:30 PM.


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