【For Newcomers】Recommended Settings and Usage of A5:SQL Mk-2
To reach a broader audience, this article has been translated from Japanese.
You can find the original version here.
Introduction
#Recently, I thought that combining pickles and boiled eggs might make something as delicious as tartar sauce, so I tried it with kimchi and wasabi-flavored nozawana pickles. (It's not bad, but I don't recommend it) - Ishihara.
In this article, I will describe the recommended settings and usage of the DB development tool A5:SQL Mk-2[1] (hereafter referred to as A5M2), which is frequently used in various projects, aimed at newcomers.
Workspace Settings
#Have you ever had the mishap of thinking you were operating in the development environment but were actually in a different environment? To prevent such unforeseen situations, it is recommended to first set up a workspace.
A workspace is a collection of DB registration information and information about open files. The image is like having a workbench for each environment, allowing you to perform DB operations separately.
Let's set it up.
-
Launch A5M2 and press the add button at the bottom left of the screen when the following dialog is displayed.
(If the above is not displayed, go to Settings > Launch and Manage Workspace from the toolbar) -
Name it so that you can recognize the environment you are connecting to, and press the OK button.
Important Database Settings
#Even if you separate workspaces, there is still a risk of mishandling. Let's set up the database for the production environment.
-
Right-click on the left edge of the screen > Add and Remove Database
-
Check the DB type: Production environment, select a noticeable color (red is recommended), and press the OK button.
By setting this up, you will not be able to connect unless you check "Connect to the production environment (or a database that requires caution)" when connecting. Be prepared when connecting to the production environment.
Transaction Settings
#Have you ever accidentally operated on other records when updating/deleting? A5M2 has a setting to automatically start a transaction during CRUD operations, which I will introduce.
-
Check "Automatically start a transaction when updating the database" under Database Connection and press the OK button.
After the above setting, the icon at the top left will blink during DB updates, and you can select commit or rollback by pressing it.
Result Set Comparison
#When you want to check if the implemented functionality is updating the data as expected, result set comparison is effective.
- Create and execute a query targeting the data you want to check.
- Press the following icon.
- A dialog will be displayed, execute the process you want to check and update the data. Then press the execute (compare) button.
- The result set comparison dialog will be displayed, and pressing the export to Excel button will show the differences in Excel.
It is also useful as evidence for unit tests, and if unified within the team, it will reduce discrepancies in evidence notation among responsible persons.
Conclusion
#When I checked the release notes of A5M2 out of curiosity, I was surprised to find that the beta version was released in July 1997, and updates are still being made to this day[2]. I realized once again that the tools we use casually are available because someone created and maintains them, and I hope to use them with gratitude.
SQL development tool. I call it "A5M2", but there seem to be various pronunciations. Many people must have thought (english?) when their surroundings called it "A5, A5" during their newcomer days. ↩︎
Even counting from now (June 2024), it's been 27 years. I think there are newcomers reading this thinking (I wasn't even born yet). ↩︎