MS Developer Applications

     Go!
Prospero Blocks


 

Chat Center

Access Conference Room
Topic: Access

Board Folders

Misc. Tech Questions: 2346 msgs in 552 dscns, Latest: Jul-6 Misc. Tech Que...
2346 msgs in 552 dscns
Latest: Jul-6
Access Database Design: 1194 msgs in 247 dscns, Latest: Oct-27 Access Databas...
1194 msgs in 247 dscns
Latest: Oct-27
Access Forms/Reports: 3425 msgs in 749 dscns, Latest: Nov-1 Access Forms/R...
3425 msgs in 749 dscns
Latest: Nov-1
Access Code/Macros: 2335 msgs in 550 dscns, Latest: Sep-24 Access Code/Ma...
2335 msgs in 550 dscns
Latest: Sep-24
Access Roundtable: 851 msgs in 199 dscns, Latest: 5/17/09 Access Roundtable
851 msgs in 199 dscns
Latest: 5/17/09
SQL Server/Queries: 1044 msgs in 248 dscns, Latest: Oct-15 SQL Server/Que...
1044 msgs in 248 dscns
Latest: Oct-15
.NET Programming: 838 msgs in 197 dscns, Latest: 3/18/09 .NET Programming
838 msgs in 197 dscns
Latest: 3/18/09
VB/VBA Programming: 1081 msgs in 270 dscns, Latest: Nov-3 VB/VBA Program...
1081 msgs in 270 dscns
Latest: Nov-3
VFP/Fox:Lang/Design/OOP: 4508 msgs in 740 dscns, Latest: Nov-16 VFP/Fox:Lang/D...
4508 msgs in 740 dscns
Latest: Nov-16
VFP/Fox:Forms/Controls: 2396 msgs in 423 dscns, Latest: Nov-4 VFP/Fox:Forms/...
2396 msgs in 423 dscns
Latest: Nov-4
VFP/Fox:Data/DBC/Views: 1697 msgs in 277 dscns, Latest: Sep-7 VFP/Fox:Data/D...
1697 msgs in 277 dscns
Latest: Sep-7
VFP/Fox:Reports/Misc/2x: 1815 msgs in 397 dscns, Latest: Oct-6 VFP/Fox:Report...
1815 msgs in 397 dscns
Latest: Oct-6
Delphi/Kylix/Pascal: 896 msgs in 86 dscns, Latest: 1/23/07 Delphi/Kylix/P...
896 msgs in 86 dscns
Latest: 1/23/07
Breakpoint Chatter: 1855 msgs in 119 dscns, Latest: 4/12/09 Breakpoint Cha...
1855 msgs in 119 dscns
Latest: 4/12/09
Message Area
Access Database Design

Relationship Structure

 Subscribe SubscribeGet a printer-friendly version of this discussion Print Discussion 

#1 of 6

     Posted Oct-27 8:45 PM   
Emma
 
From  Emma  Posts 89  Last Oct-27
To  All      [Msg # 25196.1 ]    

Hi, All.  I know it's recommended that you don't have a "circle" of relationships, meaning 3 tables that are all related to each other.  The preferred structur is a "line" of relationships, meaning 1 table is related to the 2nd table, and the 2nd table is related to the 3rd table.  I'm restructuring this mess of a database and wondered if there's any way to avoid a relationship "circle" or if it's OK in some circumstances to have a relationship "circle".  Here's the scenario:

tblSuppliers:  SupplierKey (primary key), SupplierName, SupplierAddress, etc.

tblSupplierContacts:  SupplierContactKey (primary key), SupplierKey (foreign key), ContactName, ContactPhoneNbrs, etc.

tblSupplierOrders:  SupplierOrderKey (primarykey), SupplierKey (foreign key), SupplerContactKey (foreign key), SupplierDetails, etc.

The Supplier Orders has to list both the supplier and the supplier contact.  As a result, I can't figure out how to avoid a "circle" of relationships.

Any advice/suggestions/guidance will be appreciated.  Thanks much - Emma

 

 OptionsReply to this Message Reply

#2 of 6

     Posted Oct-27 9:03 PM   
Dale G. Shields (WUGNET)
 
From  Dale G. Shields (WUGNET)  Posts 56  Last Nov-16
To  Emma      [Msg # 25196.2 Message 25196.2 replying to 25196.1 25196.1 ]    

Normalize things more:

Table of Suppliers

Table of Contacts, linking to Supplier

Table of Orders, linking to the Contact who placed the order

I suspect the term "Suppliers" was ober used in the original design and that created the circular reference...

 

 OptionsReply to this Message Reply

#3 of 6

     Posted Oct-27 9:15 PM   
Emma
 
From  Emma  Posts 89  Last Oct-27
To  Dale G. Shields (WUGNET)      [Msg # 25196.3 Message 25196.3 replying to 25196.2 25196.2 ]    
Two things.  First, thanks for that suggestion.  I did do that in cleaning up another set of relationships, so I'm glad I got that right.  Second, though, for the example I posted, sometimes they won't specify a contact name.  They just know the supplier.  (Sorry I didn't mention that in my original post.)   So while Supplier is sometimes repetitive (when the contact is specified), it's necessary at other times (when the contact is not specified).  Any help on this is appreciated very much!  Thanks - Emma
 OptionsReply to this Message Reply

#4 of 6

     Posted Oct-27 9:52 PM   
Dale G. Shields (WUGNET)
 
From  Dale G. Shields (WUGNET)  Posts 56  Last Nov-16
To  Emma      [Msg # 25196.4 Message 25196.4 replying to 25196.3 25196.3 ]    

OK:

Table of Suppliers

Table of Orders, linking to Suppliers

Table of Contacts, linking to Suppliers

When the Order is taken, have a drop-down box that lists the Contacts for the given Supplier and allow "none" as a selection...

Never allow "the Data" to define "the Structure"...

Look at it this way:  An Order will ALWAYS have a Supplier reference, so that is the primary link.  Contact information is like a "memo" item and does not impact the Order itself...

Make more sense?

 

 

 OptionsReply to this Message Reply

#5 of 6

     Posted Oct-27 10:27 PM   
Emma
 
From  Emma  Posts 89  Last Oct-27
To  Dale G. Shields (WUGNET)      [Msg # 25196.5 Message 25196.5 replying to 25196.4 25196.4 ]    
Hi, Dale. I don't think I do understand.  How do I store the contact info / the drop-down list?  Is it a field in tblOrders?   Thanks - Emma
 OptionsReply to this Message Reply

#6 of 6

     Posted Oct-27 11:21 PM   
Dale G. Shields (WUGNET)
 
From  Dale G. Shields (WUGNET)  Posts 56  Last Nov-16
To  Emma      [Msg # 25196.6 Message 25196.6 replying to 25196.5 25196.5 ]    (Unread)

You populate the box from the Contact table and include only the items with a matching Supplier value.  I don't have any code sample handy, sorry...

 

 OptionsReply to this Message Reply
 Subscribe SubscribeGet a printer-friendly version of this discussion Print Discussion 
Access Database Design

Relationship Structure

  
 
     

Welcome, Guest

  • Post a message
  • New messages to you
  • Log in

Start Search
Advanced Search

Prospero Blocks
 
 
Special Offers
 
 
 

Finding People

 
 
 

Cool Clicks!

 
 
 
© 2009 Netscape Communications Corp. All rights reserved.

Legal Notices | Privacy Policy