SQL database self interaction entity
        Posted  
        
            by 
                Ricardo Costa
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Ricardo Costa
        
        
        
        Published on 2012-12-16T22:46:50Z
        Indexed on 
            2012/12/16
            23:03 UTC
        
        
        Read the original article
        Hit count: 233
        
sql
|entity-relationship
I've been working on a database, wich is referent to an Aeroport management. I'm having a problem that it's freaking me out.. What i'm trying to do is, assuming that a client wants to know the distance between 2 locations, in miles or kms. As an example, if the user wants to know the distance between London and Amsterdam, should that distance be calculated by a formule or should it be already stored on the database?
        (1,N) ____________  
 ____________|__          |
|              |          |
| City/Airport |<---------|
|______________|
How can i show to user the distance between his 2 choices?
RicardoCosta
© Stack Overflow or respective owner