I suggest to define the database schema outside the php code in a xml file.
You can read more about it at : [[BR]
The main idea is to remove all of this from core/Piwik.php and abstract a bit more the database from the main code.
we don't want to abstract stuff just for the sake of it.
We are not supporting any other DB than mysql (see http://piwik.org/faq/installation/#faq_55) so at this stage this abstraction is unecessary.