I'm wondering what is the best way to create and maintain databases maps and SQL scripts. I know I'm more a fan of writing the SQL script by hand on a text editor (plus designing a map to have next to me on a piece of paper), while others prefers to use database maps softwares (MySQL Workbench, Visual Studio... some listed in this post) to automatically generate the script.
Both solutions have advantages and drawbacks. I see these advantages:
- SQL script by hand:
- You know exactly what you write.
- You are able to keep a clean and easily readable SQL code.
- Writing the code, you keep a better view of your database specifics.
- Writing the code enables you to to practive your SQL knowledge.
- Automatically generated script from designed map:
- Saves some time.
- Even without knowing SQL language, you can generate a script (even if I listed this one as an contrary advantage for SQL script by hand).
- Prevents typos.
What do you think, what way do you proceed?