What is the best way of creating tables in MySQL?

56 Views Asked by At

We are developing a site in which 3 persons are working. One of my friend used a separate file named "dbsetup.php" to set up all the tables in MySQL, which works when included in the script, whereas i have created all the tables using Command-Line and phpMyAdmin. Which one is best, secured and good for long-run?

1

There are 1 best solutions below

0
On BEST ANSWER

I would say using a separate script is always good. Security may not be a issue in either approach but if you have a separate script file then deployment become easy since the same file you can run in multiple different environment and deploy the database.

It's also more maintainable since if any change required, do it in one place and get going.

Also, saves lots of time in typing every time. Right?