接続文字列とは?
接続文字列は、サーバーアドレス、ポート、データベース名、認証、オプションなど、クライアントがデータベースに到達するために必要な詳細をまとめた書式化された文字列です。アプリケーションは起動時にそれを読み取って接続を開きます。多くの場合、認証情報を含むため、ソース管理にコミットするのではなくシークレットとして扱われます。
なぜ重要か
書式が誤っていたり古かったりする接続文字列が1つあるだけで、起動失敗や接続エラーの一般的な原因になります。シークレットマネージャーに保存すれば、認証情報をコードから排除でき、ローテーションも容易になります。
関連ガイド
What Is a Prepared Statement?A prepared statement is a precompiled SQL template with placeholders for values, letting the database reuse t…
What Is a Transaction Isolation Level?An isolation level sets how much one transaction can see of others in progress, trading consistency guarantee…
What Is a Database Index?A database index is an auxiliary data structure that lets the engine find rows matching a query quickly, avoi…