Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Designing Tables

Status
Not open for further replies.

kaygirl

Technical User
Jan 24, 2002
9
EU
I am designing a new database which previously was a flat file table. I have broken this flat file down into four tables but they do not seem to be linking (using queries) very well.

I do not know if I am designing the tables properly. Table 1 is Organisation Information, ie address, etc, Table 2 is Contact, Firstname, Lastname etc Information. The reason for two separate tables is because there could be many contacts for the one organisation - is this correct? or should Contact information and organisation information be in the one table?
 
If you have (or expect to have) more than one contact per organization, then yes, they should be in separate tables with a one to many relationship from organization to contacts. Programming isn't a profession of choice.
It's a profession of calling...
"Hey Programmer, your application broke again!" [spin]

Robert L. Johnson III, A+, Network+, MCP
robert.l.johnson.iii@ssmb.com
 
Agree with mstrmage .. the one to many relationship looks fine.

As to the linking not working . . . your 'one' table (Org Info) should have a primary key, a field whose value uniquely identifies that record in the table. For linking, each 'many' table, i.e Contact, etc, should contain a 'foreign key' field whose value is identical to the corresponding row in the 'one' table. Without this key relationship, you won't be able to link properly.

There are some other issues regarding joins in queries, so if these comments don't get it fixed, post again! - - - -

Bry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top