ÀÂÒ
Language:

Remote Training on Programming

Problems On-line status Contests FAQ
For authors:
Register  ||  Login
 
Hello, Guest! Login or register.

How to send SQL queries for check.
You must name all computed columns. Example: select min(price) as minpr from km_prices


Database schema:

 

 

1. km_prices (prices of 1 km)

class(classes of buses)

price (price of 1 km for this class)

 

2. models (models of buses) 

cod_model (code, surrogate key)

name_model (name of model)

places (number of places in a bus of this model)

            class (class of comfort)

 

3. buses (buses)

            cod_bus (code of bus)

            bus_number (registration number)

            cod_model (model of bus, foreign key)

 

4. points (stations)

            cod_point (code, surrogate key)

            name_point (name of station)

            distance (distance from starting point)

 

5. routes (routes of buses)

            cod_route (code, surrogate key)

            name_route (name of route)

 

6. points_routes (relationship between stations (points) and routes)

            cod_point (code of point, foregin key)

   cod_route (code of route, foreign key)

 

7. trips (trips of buses)

   cod_trip (code of trip, surrogate key)

   week_day (day of week)

   hour (hours of departure)

   minute (minutes of departure)

   cod_route (code of route, foreign key)

   cod_bus (code of bus, foreign key)

   tickets (number of sold tickets)


We can all benefit by doing occasional "toy" programs, when artificial restrictions are set up, so that we are forced to push our abilities to the limit. The art of tackling miniproblems with all our energy will sharpen our talents for the real problems. Donald E. Knuth.
time generating 0.015 sec.
© Copyright VSTU, AVT, Nosov D.A.