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  

One table or 2?



 
 
Thread Tools Display Modes
  #1  
Old July 8th, 2004, 09:10 PM
FG
external usenet poster
 
Posts: n/a
Default One table or 2?

I need to track contracts our company has with other
companies. I thought I would create a table that would
contain CompanyInfo such as CompanyName,Address,Phone,
etc. and another table with ContractInfo:CompanyName,
ContractType, EffectiveDate, ExpirationDate, etc. But now
I found out that the Address,Phone, etc can be different
for each contract. Could I could have a single table or
should I still keep the company table for CompanyName just
to have consistency in data entry, etc. What's wrong with
this picture, I feel like I'm missing something.
  #2  
Old July 9th, 2004, 07:36 AM
John Vinson
external usenet poster
 
Posts: n/a
Default One table or 2?

On Thu, 8 Jul 2004 13:10:41 -0700, "FG"
wrote:

I need to track contracts our company has with other
companies. I thought I would create a table that would
contain CompanyInfo such as CompanyName,Address,Phone,
etc. and another table with ContractInfo:CompanyName,
ContractType, EffectiveDate, ExpirationDate, etc. But now
I found out that the Address,Phone, etc can be different
for each contract. Could I could have a single table or
should I still keep the company table for CompanyName just
to have consistency in data entry, etc. What's wrong with
this picture, I feel like I'm missing something.


Neither one NOR two: you need at least FOUR, I'm guessing!

CompanyInfo
CompanyName *only* if you can be sure it's unique; you may want an
autonumber CompanyID as the Primary Key instead
other info about the company as a whole

Contracts
ContractID a unique contract number, manually assigned,
automatically assigned, or perhaps an Autonumber
type, dates, etc.

Addresses
AddressID autonumber primary key
StreetNumber
StreetName
Suffix e.g. Ave., Ct., St.
City
State you'll probably want a table of states
PostCode
Country and of countries

ContractAddresses
ContractID link to Contracts
AddressID link to Addresses


John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
  #3  
Old July 9th, 2004, 01:58 PM
Diana
external usenet poster
 
Posts: n/a
Default One table or 2?

If you only have one contact per company, you could get away with just one large table, with one field for each thing (Compay name, company address, contract name, contract address, etc.)

But if you might have more than one contact for each company, two tables would work. The first table would contain just company info (name, address, whatever else), and a primary key field (such as the company's tax id#, or maybe an autonumber) and it would have a one-to-many link with a second table that had the contact info (name, job title, address, etc.).

-diana


"FG" wrote:

I need to track contracts our company has with other
companies. I thought I would create a table that would
contain CompanyInfo such as CompanyName,Address,Phone,
etc. and another table with ContractInfo:CompanyName,
ContractType, EffectiveDate, ExpirationDate, etc. But now
I found out that the Address,Phone, etc can be different
for each contract. Could I could have a single table or
should I still keep the company table for CompanyName just
to have consistency in data entry, etc. What's wrong with
this picture, I feel like I'm missing something.

 




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
Table Error Message Di New Users 2 June 30th, 2004 07:57 AM
Table Analyser and more... Mary Ann Database Design 2 June 29th, 2004 06:36 PM
resize table from A4 size to A5 ims New Users 3 June 9th, 2004 01:05 AM
COMPARE THE TWO TABLES Stefanie General Discussion 0 June 4th, 2004 04:36 PM
Table design for a booking system Brian C Database Design 2 April 27th, 2004 03:11 AM


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