In: Math
d. A travel agency is frequently asked questions about tourist
destinations. For
example, customers want to know details of the climate for a
particular month,
the population of the city, and other geographic facts. Sometimes
they request
the flying time and distance between two cities. The manager has
asked you to
create a database to maintain these facts.
Customers want to know details of the climate for a particular month,
the population of the city, and other geographic facts. sometimes,they request the flying time and distance between two cities .
The manager has asked you to create a database to maintain these facts.
DESTINATION
DestinationID | DestinationName | Population | PlacesToVisit |
Destination table will consists of an ID ( primary key), the destinatin name, population, placestovisit etc.
Destination_Weather
DestinationId | Month | Climate |
This table will contain the destination and its weather for a particular month. Here the primary key is (destiation_id + month)
DESTINATION_DISTANCE
DESTINATION_ID | LATITUDE | LONGITUDE |
This table will contain the latitude and longitude of a particular destination. So when user queries for a distance between any two cities, based on the latitude and longitude values of the two cites, we can write a program to calculate the distance and return the result.
AIRLINE_DIST_TIME
AIRLINE | DISTANCE | TIME |
This table consists of the particular airline and how much distnace is covered in what time is stored.
So when user asks for the time taken by a particular airline between two places, we can query the destination latitude and longitudes from the destination_dist tables , and calculate the distances between the two destinations.
Then based on the distance to be covered and the particular airline, we can search on the AIRLINE_DIST_TIME to determine the time required.