Mathematical and Physical Journal
for High Schools
Issued by the MATFUND Foundation
Already signed up?
New to KöMaL?

Problem I. 404. (May 2016)

I. 404. Family relationships can be visualized not only by charts, but also by using database applications. One can find an example of this sort in the advanced-level problems for Matriculation Examination in February 2006. Now we are analyzing relationships in the Kiss–Nagy family with a database application. The following part of the family tree is stored in the database.

The data are stored in the tab-separated and UTF-8-enocded text file csaladtagok.txt, with the first line containing the field names.

1. Create a database i404. Import the data file into the database as csaladtagok. The appropriate data formats and the key should be set upon importing.

Now solve the following tasks. At each query below, only the requested values should appear. Your solutions should be saved by using the names in parentheses.

We remark that this database yields only a simplified family model, hence we assume that there were no divorces, remarriages, or there are no half-brothers or half-sisters among these people. During your solution it may become necessary to use multiple copies of the data table.

2. By using a query, give the number of males and females. (2ffino)

3. By using a query, list the married couples. Display each couple only once. (3hazasparok)

4. Prompt the user to enter the name of a family member. Then, by using a query, determine the father and mother name. If there are several family members with the same name, display data for all of them. (4apaanya)

5. By using a query, list the siblings. Each pair should appear only once. (5testverek)

6. By using a query, determine the maternal and paternal grandmothers of the grandchildren, according to the sample. If both grandmothers are missing from the database, the name of the grandchild should not appear either. (6nagyi)

7. By using a query, list the first cousins. Each pair should appear only once. (7unokateso)

8. Create a report to alphabetically list the family members in the database, and (if present) the name of their mother, and wife or husband. Your solution should use queries. The title and the column header text should be set according to the example. (8lista)

The database with a short documentation (containing the name and version number of the database application) should be submitted in a compressed file

Downloadable file: csaladtagok.txt.

(10 pont)

Deadline expired on June 10, 2016.


5 students sent a solution.
10 points:Nagy Ábel.
9 points:Olexó Gergely.
6 points:1 student.
5 points:1 student.
4 points:1 student.

Problems in Information Technology of KöMaL, May 2016