勉強日記

チラ裏

SQL

MySQL 5.6 Developer試験対策 1 MySQL アーキテクチャ

MySQL 5.6 Developer試験 公式「試験内容 チェックリスト」 https://education.oracle.com/ja/mysql-56-developer/pexam_1Z0-882education.oracle.com MySQL 5.6 リファレンスマニュアル dev.mysql.com MySQL ServerとのインターフェースであるMySQL クライ…

SQL Antipatterns ch25 Magic Beans

pragprog.com Magic Beans Objective: Simplify Models in MVC Antipattern: the Model Is an Active Record コラム: Leaky Abstractions Active Record Couples Models to the Schema Active Record Exposes CRUD Functions Active Record Encourages an An…

SQL Antipatterns ch24 Diplomatic Immunity

pragprog.com Diplomatic Immunity Objective: Employ Best Practice Antipattern: Make Sql a Second-Class Citizen How to Recognize the Antipattern Legitimate Uses of the Antipattern Solution: Esablish a Big-Tent Culture of Quality Exhibit A: D…

SQL Antipatterns ch23 See No Evil

pragprog.com See No Evil Objective: Write Less Code Antipattern: Making Bricks Without Straw Diagnoses Without Diagnostics Lines Between the Reading How to Recognize the Antipattern Legitimate Uses of the Antipattern Solution: Recover from…

SQL Antipatterns ch22 Pseudokey Neat-Freak

pragprog.com Pseudokey Neat-Freak Objective: Tidy Up the Data Antipattern: Filling in the Corners Assigning Numbers Out of Sequence Renumbering Existing Rows Manufacturing Data Discrepancies How to Recognize the Antipattern Legitimate Uses…

SQL Antipatterns ch21 SQL Injection

pragprog.com SQL Injection Objective: Write Dynamic SQL Queries Antipattern: Execute Unverified Input As Code Accidents May Happen The Top Web Security Threat The Quest for a Cure Escaping Values Query Parameters コラム: What Was My Comple…

SQL Antipatterns ch20 Readable Passwords

pragprog.com Readable Password Objective: Recover or Reset Password Antipattern: Store Pasword in Plain Text Storing Paswords Authenticating Passwords Don't Lump Together Two Different Conditions Sending Passwords in Email How to Recognize…

SQL Antipatterns ch17 Poor Man's Search Engine

pragprog.com Poor Man's Search Engine Objective: Full-Text Search Antipattern: Pattern Matching Predicates How to Recognize the Antipattern Legitimate Uses of the Antipattern Solution: Use the Right Tool for the Job Vendor Extensions Full-…

SQL Antipatterns ch19 Implicit Columns

pragprog.com Implicit Columns Objective: Reduce Typing Antipattern: A Shortcut that Gets You Lost Breaking Refactoring Hidden Costs You Asked for It, You Got It How to Recognize the Antipattern Legitimate Uses of the Antipattern Solution: …

SQL Antipatterns ch18 Spagetti Query

pragprog.com Spagetti Query Objective: Decrease SQL Queries Antipattern: Solve a Complex Problem in One Step Unintended Products As Though That Weren't Enough... How to Recognize the Antipattern Legitimate Uses of the Antipattern Solution:…

SQL Antipatterns ch16 Random Selection

pragprog.com Random Selection Objective: Fetch a Sample Row Antipattern: Sort Data Randomly How to Recognize the Antipattern Legitimate Uses of the Antipattern Solution: In No Particular Order... Choose a Random Key Value Between 1 and MAX…

SQL Antipatterns ch15 Ambiguous Groups

pragprog.com Ambiguous Groups Objective: Get Row with Greatest Value per Group Antipattern: Reference Nongrouped Columns The Single-Value Rule Do-What-I-Mean Queries How to Recognize the Antipattern コラム: GROUP BY and DISTINCT Legitimate…

SQL Antipatterns ch14 Fear of the Unknown

pragprog.com Fear of the Unknown Objective: Distinguish Missing Values Antipattern: Use Null as an Ordinary Value, or Vice Versa Using Null in Expressions Searching Nullable Columns Using Null in Query Parameters Avoiding the Issue How to …

SQL Antipattern ch13 Index Shotgun

pragprog.com Index Shotgun Objective: Optimize Performance Antpattern: Using Indexes Without a Plan No Indexes Too Many Indexes コラム: Indexes Aren't Standard When No Index Can Help コラム: Low-Selectivity Indexes How to Recognize the Ant…

SQL Antipatterns ch12 Phantom Files

pragprog.com Phantom Files Objective: Store Images or Other Bulky Media Antipattern: Assume You Must Use Files Files Don't Obey DELETE Files Don't Obey Transaction Isolation Files Don't Obey ROLLBACK Files Don't Obey Database Backup Tools …

SQL Antipatterns ch9 Metadata Tribbles (WIP)

pragprog.com Metadata Tribbles Objective: Support Scalability Antipattern: Clone Tables or Columns コラム: Mixing Metadata with Data Spawning Tables Managing Data integrity Synchronizing Data Ensuring Uniqueness Querying Across Tables Sync…

SQL Antipatterns ch8 Multicolumn Attriubtes

pragprog.com Multicolumn Attriubtes Objective: Store Multivalue Attributes Antipattern: Create Multiple Columns Searchinig for Values Adding and Removing Values Ensuring Uniqueness Handling Growing Sets of Values How to Recognize the Antip…

SQL Antipatterns ch7 Polymorphic Associations (WIP)

pragprog.com Polymorphic Associations Objective: Reference Multiple Parents Antipattern: Use Dual-Purpose Foreign Key Defining a Polymorphic Association Querying a Polymorphic Association Non-Object-Oriented Example コラム: Mixing Data Wit…

SQL Antipatterns ch6 Entity-Attribute-Value

pragprog.com Entity-Attribute-Value Objective: Support Vairable Attribute Antipattern: Use a Generic Attribute Table Querying an Attribute Supporting Data Integrity Reconstructing a Row How to Recognize the Antipattern Legitimate Use of th…

SQL Antipatterns ch5 Keyless Entry

pragprog.com Keyless Entry Objective: Simplify Database Architecture Antipattern: Leave Out the Constraints Assuming Flawless Code Checking for Mistakes "It's Not My Fault!" Catch-22 Updates How to Recognize the Antipattern Legitimate Uses…

SQL Antipatterns ch4 ID Required

pragprog.com ID Required コラム: Do I Really Need a Primary Key? Objective: Establish Primary Key Conventions Antipattern: One Size Fits All Making a Redundant Key Allowing Duplicate Rows Obscuring the Meaning of the Key Using USING Compou…

SQL Antipatterns ch3 Naive Trees

pragprog.com Naive Trees Objective: Store and Query Hierarchies Antipattern: Always Depend on One's Parent Query a Tree with Adjacency List Mantaining a Tree with Adjacency List How to Recognize the Antipatterns Legitimate Uses of the Anti…

理論から学ぶデータベース実践入門 ch14 トランザクションの本質

gihyo.jp まとめ トランザクション トランザクションの機能 トランザクションの鍵、スケジュール 「データの正しさ」の定義 スケジューラの性能 トランザクションの特徴 ACIDとは 原子性(Atomicity) 一貫性(Consistensy) 分離性(Isolation) 永続性(Durabilit…

理論から学ぶデータベース実践入門 ch13 リファクタリングの最適解

gihyo.jp まとめ リファクタリング DBのリファクタリングは大変 マルチアプリケーションにおけるDB環境 なぜリファクタリングが必要なのか リファクタリングの手順 スキーマの移行期間 反復的なリファクタリング 回帰テスト ベンチマークテスト マイグレーシ…

理論から学ぶデータベース実践入門 ch11 インデックスの設計戦略 (2/2)

gihyo.jp リレーショナルモデルとインデックス インデックスはリレーショナルモデルの一部ではない 正規化とインデックス カラム数が絞られる 問題児NULL 指令: 最適なインデックスを探せ! 必要なインデックス インデックスのアクセス特性 インデックスが使…

SQL Antipatterns ch11 31 Flavors (WIP)

pragprog.com 31 flavors Objective: Restrict a Column to Specific Values Antipattern: Specify Values in the Column Definition コラム: Baskin-Robbins 31 Ice Cream What Was the Middle One? Adding a New Flavor Old Flavors Never Die Portability…

理論から学ぶデータベース実践入門 ch11 インデックスの設計戦略 (1/2)

gihyo.jp まとめ インデックスの働き RDBのインデックス インデックスの左端と範囲検索 セカンダリインデックスの更新 インデックスの種類 ハッシュインデックス 全文検索インデックス 形態素解析 Nグラム Rツリーインデックス 関数インデックス ビットマッ…

理論から学ぶデータベース実践入門 ch10 グラフに立ち向かう

gihyo.jp まとめ グラフの構造 ノード、エッジ 隣接 次数 歩道、小道、道 多重辺 ループ 閉路 連結 部分グラフ カットセット、ブリッジ エッジの向きと重み グラフの応用例 グラフの種類 一般グラフ 単純グラフ 連結グラフ/非連結グラフ 完全グラフ 正則グラ…

理論から学ぶデータベース実践入門 ch9 履歴データとうまく付き合う

gihyo.jp まとめ 履歴データの問題点 世界は履歴データで溢れている 履歴とリレーショナルモデルの相性問題 履歴データの具体例 履歴データの何が問題になるのか リレーションと時間軸との直交性 NULLの可能性 特定の行だけ意味が違う 履歴データに対する解…

理論から学ぶデータベース実践入門 ch8 SELECTを攻略する (2/2)

gihyo.jp リレーショナルではない操作 リレーショナルな操作のおさらい ソート 明示的に定義されていないカラム ストアドファンクション(ユーザ定義関数) コラム: 集約とGROUP BY リレーショナルではない操作の扱い方 インデントでSQLを読みやすくする リレ…