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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |