Problem I. 236. (March 2010)
I. 236. By downloading files utvonal.txt, kapcsolo.txt and jarat.txt from our web page, you can study the daily flight routes and number of passengers of a certain airlines.
The first lines of these tabulator separated, UTF-8 encoded text files contain the field names.
[1.]
Create a new database ``airlines''. The three files above should be imported into the database with names utvonal, kapcsolo and jarat.
[2.]
When reading these files, appropriate data format and keys should be set. New fields should not be included.
Tables
utvonal (utkod, honnan, hova)
|
kapcsolo (utkod, jaratszam)
|
jarat (jaratszam, indul, erkezik, utasmax, foglalt)
|
Now solve the following task. When a query is answered, no other data, only the requested results should appear. Queries should be named as indicated in the parentheses.
[3.]
Make a query to list in alphabetical order those flights that depart from Budapest. Each city should be listed only once. (3celallomasok)
[4.]
Which is the earliest flight from Vienna to London that has available seats? Give the flight number, the departure time and the number of free seats. (4koran)
[5.]
Determine for each city the number of departing flights with seats available.\ (5varosonkent)
[6.]
Which is the most popular destination city (according to passenger number)?\ (6nepszeru)
[7.]
List those cities which are directly accessible (that is, without transfer) from Vienna but not from Budapest. (7atszallas)
[8.]
We would like to travel the Budapest--Amsterdam--Budapest route in one day. List the departure times of suitable flights from Amsterdam, if we start off from Budapest by the earliest flight, and we spend at most 2 hours in Amsterdam. (8retur)
[9.]
Due to good weather conditions, flights to Dubrovnik land 15 minutes earlier. Make a query that modifies arrival times of all such flights. (9dubrovnik)
The database (i236.odb, i236.mdb, ...) together with a short documentation (i232.txt, i232.pdf, ...) -- also containing the name and version number of the database application -- should be submitted in a compressed file (i236.zip).
(10 pont)
Deadline expired on April 12, 2010.
Sorry, the solution is available only in Hungarian. Google translation
Megoldásokról
Az érettségi követelményrendszerének megfelelő adatbázis-kezelési feladatra három teljes értékű megoldás érkezett. Ezek mellett a többi megoldás színvonala erősen szór. Valószínűsíthető, hogy a feladatbeküldők egy része még nem, vagy kevés ilyen típusú feladatot oldott meg. Feltűnő, hogy a segéd- vagy allekérdezést igénylő lekérdezések nem készültek el.
A megoldások elkészíthetők QBE-rács használatával és SQL nyelvű lekérdezések írásával is. A két fajta feleletalkotási módot egyenértékűnek tekintjük. A két módszernek más-más nehézsége, illetve előnye van. Az adatbázis-kezelési feladatokban a probléma megoldó képesség vizsgálata a cél.
A javítási útmutató az SQL nyelvű minta megoldásokat adja meg a könnyebb és jobb dokumentálhatóság miatt.
A beküldött megoldásokban feltűnő, hogy elsősorban a lekérdező-ráccsal készültek és kevesen (általában a sikeresebb megoldók) használták az SQL-nyelvet. Az összetettebb problémák megoldási stratégiáját jobban fejezi ki az SQL reprezentáció.
Mintamegoldás Szabó Attila (Pécs, Leőwey Klára Gimnázium) 9. osztályos tanuló megoldását közöljük: i236.mdb
Javítási útmutató LegitarsasagJav.pdf
Statistics:
9 students sent a solution. 10 points: Balla Attila, Horváth 135 Loránd, Szabó 928 Attila. 9 points: Pap 999 Dávid. 8 points: 1 student. 5 points: 1 student. 4 points: 1 student. 3 points: 2 students.
Problems in Information Technology of KöMaL, March 2010