Initial table creation logic