Simple database query
Category: Computers > Programming
Asked by: osigrace-ga
List Price: $10.00
22 Nov 2006 11:37 PST
Expires: 22 Dec 2006 11:37 PST
Question ID: 784883
Assume you need to create a database to hold the information on a fleet of cars and in particular the major compo4nents of the cars (wheels, engine, brakes..), their replacement costs and theoritical life(amount of time or kilometres that they will last). The main purpose of this database will be to a) hold an inventory of the vehicles, and b) to calculate into the future how much the fleet will cost every month based on the replacement costs and theoretical life of each part. (e.g. Tires need to be replaced every 80,000km, and on average a car will do 4,000km per month....) 1. What will your main database tables be? 2. What data fields will they contain? 3. What is the SQL statement and/or flowchart to calculate and return the future monthly costs. 4. What technology would you recommend to build the front end with and why?
|There is no answer at this time.|
Re: Simple database query
From: fjager-ga on 25 Nov 2006 09:50 PST
I hope this is the answer you're looking for: 1+ 2. Table: Vehicle Fields: VehicleId EngineId BreakId WheelFrontRId WheelFrontLId WheelBackRId WheelBackLId Table: Parts Fields: PartsId Type (eg. Tyre, brake,?) Replacement costs Theoretical life 3. SELECT SUM(Replacement costs/( Theoretical life/4000)) FROM Vehicle LEFT JOIN Parts ON EngineId = PartsId OR BreakId = PartsId OR WheelFrontRId = PartsId OR WheelFrontLId = PartsId OR WheelBackRId = PartsId OR WheelBackLId = PartsId WHERE VehicleId = <some input>; 4. What technology you want to use depends how a lot of things. How many (concurrent) users? What kind of backend are you using? What is the computerknowledge of the users? Do you want to spend money? When you?re not yet have choosen a backend you can try mysql with an php front-end, this is very easy to learn, and for free so you can experiment a bit before deciding if you?re gonna use this.
If you feel that you have found inappropriate content, please let us know by emailing us at firstname.lastname@example.org with the question ID listed above. Thank you.
|Search Google Answers for|