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  

Database Structure and problem with query



 
 
Thread Tools Display Modes
  #1  
Old October 15th, 2004, 12:23 PM
Edgar Thoemmes
external usenet poster
 
Posts: n/a
Default Database Structure and problem with query

Could someone check my table structure below and let me know if it all looks
ok, I seem to be having trouble with writing some queries and I think it
might be to do with my table layout.

tbl_Suppliers – SupplierID(PK), SupplierName, Address, City, Notes,
StatusID(FK to Tbl_Status)

tbl_Status – StatusID(PK), Status

tbl_Commodity – CommodityID(PK), CommodityName, CommodityDescription,

tbl_Suppliers/Commodity – CommodityID(PK), SupplierID(PK)

tbl_Contracts – ContractID(PK), SupplierID(FK to tbl_Suppliers),
ContractDescription, StartDate, EndDate, OwnerID(FK to tbl_Owners),
EntityID(FK to tbl_Entity)

tbl_Owners – OwnerID(PK), OwnerName, JobTitle

tbl_Entity – EntityID(PK), EntityName

A couple of notes, Each Supplier could have more than one contract but each
contract can only be for one supplier.

Each supplier can be assigned to a number of commodities, different
commodities can be assigned to more than one supplier.

Each contract can only be owned by one owner but each owner can own more
than one contract.

The end result of this is that I want 1 big query to display all of this
data as I need it all to link into one big form which I will be splitting up
by Tab Controls.

I am relatively new to access so if anyone can think of a better way of
doing it I would appreciate the input.

Many thanks

  #2  
Old October 15th, 2004, 12:46 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default

Edgar

A couple observations...

First, although I see the table that resolves Suppliers and Commodities, I
don't see where/how Commodities get "used" by any other table (besides
listing in Commodity table). Does this mean that the Supplier on a Contract
supplies ALL Commodities they "own"?

Second, the most common approach to displaying one-to-many relationships is
NOT to create a massive "flat" representation through a query. Instead,
consider using subforms when you need to show, say, all the Commodities for
a given Supplier. You can embed subforms in the pages of a tab control.

--
Good luck

Jeff Boyce
Access MVP

 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
RANKING gambler Running & Setting Up Queries 22 November 4th, 2004 11:53 PM
Problem with Access database conversion Mark General Discussion 2 September 26th, 2004 04:46 AM
Template Wizard Problem - Database Structure setoFairfax General Discussion 1 September 17th, 2004 09:26 AM
Query problem - many to many relationship Deb Smith Using Forms 0 July 13th, 2004 04:06 AM


All times are GMT +1. The time now is 02:25 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.