Survey Table - Table Creation Query Location

Hi. A little about me first. I'm relatively new to PHP (9 months). I've started to learn OOP recently. Though I've not yet reached the mastery level, I'm able to understand 70% of the source code related to OOP. One of my favorite things to do is learn and observe source codes of applications to improve myself.

I've been going through the source of LimeSurvey and have been able to interpret 40-50% of the code so far. I've come to a stage where I'm having a hard time finding out where and how exactly database tables are being created for surveys.

Of what I've understood, a table for survey is being created on the fly as soon an active survey is being taken. Assuming I'm right, I'm unable to pinpoint where exactly the queries are being performed.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member,
professional service on demand
(or search sondages pro).
An error happen ? Before make a new topic : remind the
Debug mode
.