| Chat with a LIVE Microsoft
Access Expert! |
||||
|
||||
|
#1
|
||||
|
||||
|
table layout for airport minicab quote system
ok basically im creating a quote system that will show users prices from one destination to the other destination based on the size of the vehicle..
you can see a similar quote system used on the following website.. http://www.londonairporttaxi.co.uk there will be three main tables.. Airport Table airportID - primary key, autonumber airportNAME - text the airport table will consist of 5 records..Heathrow,Gatwick,Stansted,London City, Luton Town Table TownID - primary key, autonumber TownNAME - text the town table will contain a list of postcodes, maybe 50 or so (n1,n2,n3,n4,e1,e2...) Car Table CarID - primary key, autonumber CarNAME - text the car table will consist of 4 records..Saloon,Estate,MPV,Executive now what i need to do is create a similar quote system like there is on the url above.. my original idea would be to do something like this.. Have three tables that contain the quotes for each type of car..the first two listed here will work i think.. Airport2TownQuotes Table quoteID - primary key, autonumber carID - foreign key from car table airportID - the airport Pickup, foreign key townID - the town Destination, foreign key price - currency Town2AirportQuotes Table quoteID - primary key, autonumber carID - foreign key from car table townID - the town Pickup, foreign key airportID - the airport Destination, foreign key price - currency however.. for airport to airport quotes.. the resembling table would look something like this.. Airport2AirportQuotes Table quoteID - primary key, autonumber carID - foreign key from car table airportID - the airport Pickup, foreign key airportID - the airport Destination, foreign key price - currency but you cannot place the airport id twice in the same table..(this maybe a case of simply renaming the airport fields in this table such as airport1, and airport2.. but can you still link them and enforce integrity if the fields have different names?) also one example may be Heathrow to n1 is £30... this does not mean however that n1 to heathrow will be £30.. this is why i need to separate the quotes in this way.. for the 3 possible journeys (airport to airport, town to airport, airport to town).. also the quotes will be different for each car type.. anyway.. i shall be using asp to create a similar quote system on my website.. but i just need to get the final layout of the database sorted. thanks in advance for any help. |
| Sponsored Links |
|
#2
|
||||
|
||||
|
You only need one table, the pickup and destination points will define the nature of the journey. I don't understand the bit about not holding the same airport ID twice. Why not, it's a foreign key in this table? And would you want cascade deletes in this setup anyway? You're going to demolish Heathrow?
Is there no link between the fares for different vehicles? Say, the estate is 110% of the saloon fare, the MPV 175%, the executive 200%?
__________________
You can't always get what you want, but if you try sometimes you may just get what you need - Rolling Stones Cheers, Neil |
|
#3
|
||||
|
||||
|
ok could i do this then..
have one quote table.. quote id pickup destination car id price and then place either the town or airport ids in the pickups or destinations?? how would i got about linking the tables in this way? |
|
#4
|
||||
|
||||
|
Probably a combo box is the most suitable on a form. If you use the combo box wizard it will guide you to the right answer. Base the combo on a query, not directly on the table, so you can apply a sort to the data in the query.
__________________
You can't always get what you want, but if you try sometimes you may just get what you need - Rolling Stones Cheers, Neil |
|
#5
|
||||
|
||||
|
ok, i think i get you..
i place one combo on the form regarding the car type ill place 4 combos on the form regarding locations.. (2 for pickup and 2 for destination) and then shall i literally base them on a query, which just includes the field i want to select from? |
|
#6
|
||||
|
||||
|
Quote:
Quote:
__________________
You can't always get what you want, but if you try sometimes you may just get what you need - Rolling Stones Cheers, Neil |
|
#7
|
|||
|
|||
|
Re: table layout for airport minicab quote system
Hi there,
Can you please tell me what happened to the engine & how to get it now? Thanks. Y www.door2doorcabs.com |
|
#8
|
||||
|
||||
|
Re: table layout for airport minicab quote system
Some things you seemed to have overlooked is the need for additional pick ups, special passenger requirements, Luggage Excess, time of day, ETA, Etc. All these factors need to be taken into consideration when calculating a fare. A straightfoward 1 person 1 destination no additional needs would give you a base price but then you will need to factor in all the above parameters. Not quite as straightforward as it first seems.
David
__________________
www.xcraftlimited.co.uk The Home of Simple Software Solutions. O/S Windows XP (SP3) - Access 2003 (version 12.0) Remember when posting sample databases you will get a better response if it is pre Access 2007 - not all people have it installed. |
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to update number field in "many" table from autonumber field in "one" table | sueviolet | Forms | 3 | 11-22-2009 03:14 AM |
| Using FindFast with SQL Table? | jonno99 | Modules & VBA | 2 | 07-08-2005 02:31 PM |
| general problems | Gruung | Queries | 8 | 11-27-2003 07:08 PM |