Last week at Ngozi university
February 22nd, 2007 by xavier
I didn’t take the time to write new post quite often this week.
The truth is I was quite busy.
As every Monday, my student had to pass a test.
I’m definitely an exigent teacher. Although I should adapt me to the local level, I didn’t lower my exigencies.
I always want to ask my students clever questions that make them thinking.
For me, there is nothing more stupid to ask things they have as it is in their notes.
It’s like asking a copy and paste of a Word document. Even a no-brainer can do that.
But it turns out that this kind of question perturb a lot of students. They are definitely not used to it over here.
When they previously had a programmation course, they just add to change a few lines of a code proposed by the teacher. They were always directed to the answer the prof was expecting.
That Monday, I asked to my second group (DB2) a code to print a descendant list of number from 100 to 0.
We only saw the ascendant order (ie: the easiest for-boucle) in class. And not only it was the first time for them they had to write a code instead of just adding one or two statements, but they also had to think a bit. It may appear ridiculously simple for us, but it wasn’t for them.
But still, in overall they made it quite well. The average of the class was 11,9/20.
Today, it was the exam.
And I asked this (to my second class).
- Given an entity-relation diagram representing journalists (with attributes id, name, sex, birthyear) and articles (with attributes reference,titre, rubric, text, year),
1) Write a html form to let users fill the different attributes
2) Write a php script to show the following result:
“The journalist X was just added successfully” but since this sentence in french is genre-sensitive, they had to print a different answer according to the sex of the journalist entered.
They also had to show as many images of a candle as the age of the new journalist (ie: they had to implement a for-boucle on the starting at the yearbirth of the journalist, ending at 2007).
Finally, and as a bonus, they had to print a SQL query using the data entered by the user in order to add the new journalist in the database.
To my first class (DB1) I asked:
- given the same diagram, give the relational diagram. If you use foreign keys, precise the strategy for keeping the integrity.
- Fill the tables you have obtained and give two SQL queries to add a tuple in each of them.
- Give a SQL Query:
- To make a join between journalists and articles. Show the resulting table.
- To know how many articles each journalist has written this current year
- To delete a journalist. Show the result in the database. Don’t forget about your integrity strategy you have specified in question 1)
- Which articles deal with Ngozi (SELECT * FROM articles WHERE titre LIKE ‘%Ngozi’ OR texte LIKE ‘%Ngozi%’)
Now, it’s correction time. It’s gonna take me ever !
I will do that in the plane I think… Too tired for that now.
If you are interested in, here is the correction of the exam of my first class (DB1):


