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 Design - One table related to another table



 
 
Thread Tools Display Modes
  #1  
Old April 10th, 2009, 09:49 PM posted to microsoft.public.access.tablesdbdesign
Scott
external usenet poster
 
Posts: 1,119
Default Database Design - One table related to another table

My database includes (amongst others) two tables...one for flights completed
and one for airports. I've related the airport table to two fields in the
flights table...one-to-many to 'departure' and 'arrival'. Is that considered
good practice? It's worked so far, but I'm not sure if there were another
way to design this part of my database.

Thank you,
Scott
  #2  
Old April 10th, 2009, 09:59 PM posted to microsoft.public.access.tablesdbdesign
tina
external usenet poster
 
Posts: 1,997
Default Database Design - One table related to another table

there's no reason you can't (or shouldn't) relate one table to another table
more than once. typically, in the Relationships window, the first instance
of the second table shows the table name, and the second instance of the
second table tacks a "_1" on the end of the name.

hth


"Scott" wrote in message
...
My database includes (amongst others) two tables...one for flights

completed
and one for airports. I've related the airport table to two fields in the
flights table...one-to-many to 'departure' and 'arrival'. Is that

considered
good practice? It's worked so far, but I'm not sure if there were another
way to design this part of my database.

Thank you,
Scott



  #3  
Old April 10th, 2009, 11:35 PM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Database Design - One table related to another table

On Fri, 10 Apr 2009 13:49:25 -0700, Scott
wrote:

My database includes (amongst others) two tables...one for flights completed
and one for airports. I've related the airport table to two fields in the
flights table...one-to-many to 'departure' and 'arrival'. Is that considered
good practice? It's worked so far, but I'm not sure if there were another
way to design this part of my database.

Thank you,
Scott


That's perfectly legit. The departure and arrival locations of a flight are
(hopefully!!!) both airports and they are independent attributes of the
flight.
--

John W. Vinson [MVP]
  #4  
Old April 14th, 2009, 01:31 AM posted to microsoft.public.access.tablesdbdesign
Armen Stein
external usenet poster
 
Posts: 507
Default Database Design - One table related to another table

On Fri, 10 Apr 2009 16:35:06 -0600, John W. Vinson
wrote:


My database includes (amongst others) two tables...one for flights completed
and one for airports. I've related the airport table to two fields in the
flights table...one-to-many to 'departure' and 'arrival'. Is that considered
good practice? It's worked so far, but I'm not sure if there were another
way to design this part of my database.

Thank you,
Scott


That's perfectly legit. The departure and arrival locations of a flight are
(hopefully!!!) both airports and they are independent attributes of the
flight.


And a good naming convention will help you here. In our shop we would
name the two foreign keys in the Flight table something like:

AirportKey_Departure
AirportKey_Arrival

Regarding the Relationships window, Access requires two instances of
the Airport table. However, you can carefully position the second one
over the first one to save space on your diagram. Then the two
relationship lines will look as though they connect to the same table.

Another way is to position the second Airport table directly below the
first one, but with its height reduced to just showing the table name.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com

 




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


All times are GMT +1. The time now is 06:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.