I have about 22 DB tables for my extension and more are coming in as I work on the extension, I need to be able to automatically generate the DAO and BAO files to access these tables from my code, I followed this thread How do I add a new table to my extension? and it seems to be worked for the author of the post but I need more light on how generate the xml schema files if they can be generated and where do I run the xml/phpGencode.php specified in the comment to get the DAO files.
Installing civix and generating Extension using civix is the correct way you can find more details in the below link http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension
For shortcut create an hook_civicrm_install and use the statement $sql = "CREATE TABLE "; $dao = CRM_Core_DAO::executeQuery( $sql );
The above code will do the trick - but always try to use the first method using civix
You could possibly rewrite the question. "How do I define a new Entity type in my extension?"
If that is the question you are asking, then the most up to date reference for adding an entity to an extension can be found here: https://docs.civicrm.org/dev/en/master/extensions/civix/#add-a-new-entity