When are DB tables automatically created?

Assuming this is all referring to the Tag Historian modules created tables (sqlth_ or sqlt_data_ prefix) then the tables will be recreated as soon as any source of historical data actually sends data to the tag history provider. Tag history providers are automatically created 1:1 with database connections - so as soon as any scan class fires to store history on a new DB the tables will be automatically generated.