About the Author |
|
xiii | |
About the Technical Reviewer |
|
xv | |
Introduction |
|
xvii | |
|
Chapter 1 The Concept of Style |
|
|
1 | (16) |
|
Style of Development Is Dynamic |
|
|
1 | (4) |
|
SQL Requires Its Own Style |
|
|
2 | (1) |
|
|
2 | (1) |
|
|
3 | (1) |
|
Common Styles of Development |
|
|
3 | (1) |
|
|
4 | (1) |
|
|
4 | (1) |
|
|
5 | (1) |
|
Common Models in Programming |
|
|
5 | (3) |
|
Object-Oriented Programming |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
7 | (1) |
|
Starting with Table Design |
|
|
8 | (4) |
|
|
8 | (1) |
|
The Table As A Sum of Columns |
|
|
9 | (1) |
|
|
9 | (2) |
|
What Developers Must Know |
|
|
11 | (1) |
|
|
12 | (3) |
|
|
13 | (1) |
|
Good Design May Be Wrongly Implemented |
|
|
14 | (1) |
|
|
15 | (2) |
|
Chapter 2 SQL: Beauty and the Beast |
|
|
17 | (14) |
|
Can a Query Language Be So Important? |
|
|
17 | (2) |
|
Databases Require a Language |
|
|
17 | (1) |
|
|
18 | (1) |
|
|
18 | (1) |
|
A Different Style Is Needed |
|
|
19 | (1) |
|
Understanding What SQL Is and Is Not |
|
|
19 | (5) |
|
SQL Is Not Classical Programming |
|
|
19 | (1) |
|
|
20 | (1) |
|
Components of the SQL Language |
|
|
21 | (1) |
|
|
22 | (1) |
|
Inserting, Updating, and Deleting |
|
|
23 | (1) |
|
|
24 | (2) |
|
The Advantage of a Standard |
|
|
26 | (2) |
|
Programming Is a Practical Activity |
|
|
26 | (1) |
|
Is Database Programming Special? |
|
|
27 | (1) |
|
|
28 | (1) |
|
An Example of Bad Practice |
|
|
29 | (2) |
|
Chapter 3 A Holistic Vision of the Data |
|
|
31 | (12) |
|
The Concept of the Data Set |
|
|
31 | (2) |
|
The Importance of the Data Set |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
32 | (1) |
|
|
33 | (2) |
|
|
33 | (1) |
|
|
33 | (1) |
|
Data Sets as Atomic Units |
|
|
34 | (1) |
|
|
34 | (1) |
|
|
35 | (1) |
|
|
35 | (3) |
|
Understanding the Data Set |
|
|
36 | (1) |
|
|
36 | (1) |
|
Programming as a Distinct Path |
|
|
37 | (1) |
|
Promoting the Holistic Style |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
38 | (5) |
|
Visual vs. SQL Development |
|
|
39 | (1) |
|
Choosing a Tool or a Language |
|
|
40 | (1) |
|
|
41 | (2) |
|
Chapter 4 Data by Set or by Row? |
|
|
43 | (10) |
|
Choosing the Level of Detail |
|
|
44 | (1) |
|
|
44 | (1) |
|
|
45 | (2) |
|
|
45 | (1) |
|
Blocked into Poor Performance |
|
|
46 | (1) |
|
Performance Relies on a Holistic Style |
|
|
46 | (1) |
|
Querying... All the Time! |
|
|
47 | (2) |
|
|
47 | (2) |
|
How Do Programmers Do It? |
|
|
49 | (1) |
|
|
49 | (1) |
|
The Use of Scalar Functions |
|
|
50 | (1) |
|
Set-Based Debugging Is Simpler |
|
|
51 | (1) |
|
Your Role as a Database Developer |
|
|
52 | (1) |
|
|
52 | (1) |
|
Chapter 5 Data Transfer Paradigm |
|
|
53 | (28) |
|
|
53 | (1) |
|
|
54 | (1) |
|
Example 1 A Full Data Transfer Between Two Systems |
|
|
54 | (16) |
|
Business and Technical Description |
|
|
55 | (1) |
|
|
55 | (4) |
|
|
59 | (1) |
|
|
60 | (1) |
|
Filtering for English and French |
|
|
61 | (8) |
|
|
69 | (1) |
|
|
69 | (1) |
|
Example 2 Incrementally Update a Target |
|
|
70 | (11) |
|
|
70 | (1) |
|
|
71 | (5) |
|
|
76 | (5) |
|
Chapter 6 The Challenge of Scalar Functions |
|
|
81 | (22) |
|
|
81 | (1) |
|
|
82 | (1) |
|
|
82 | (1) |
|
Example 3 Filtered Full Data Transfer |
|
|
83 | (11) |
|
|
84 | (7) |
|
|
91 | (3) |
|
|
94 | (9) |
|
|
94 | (2) |
|
|
96 | (1) |
|
|
97 | (2) |
|
|
99 | (1) |
|
|
100 | (3) |
|
Chapter 7 Writing SQL vs. Writing Procedurally |
|
|
103 | (24) |
|
|
103 | (5) |
|
|
104 | (2) |
|
|
106 | (2) |
|
|
108 | (4) |
|
Taking a SQL-Based Approach |
|
|
108 | (1) |
|
|
108 | (1) |
|
|
109 | (3) |
|
Write Accurate Code First |
|
|
112 | (1) |
|
Embedded SQL vs. Dynamic SQL |
|
|
112 | (7) |
|
|
113 | (1) |
|
|
113 | (1) |
|
The Use of SQL Generators |
|
|
113 | (1) |
|
|
114 | (2) |
|
|
116 | (3) |
|
|
119 | (8) |
|
|
120 | (1) |
|
|
120 | (1) |
|
|
121 | (2) |
|
|
123 | (1) |
|
The Atomic Solution in SQL Server |
|
|
124 | (1) |
|
The Holistic Approach in SQL Server |
|
|
125 | (2) |
|
Chapter 8 Row Triggers and the Need for Atomic Solutions |
|
|
127 | (10) |
|
|
127 | (5) |
|
|
127 | (1) |
|
|
128 | (1) |
|
|
128 | (1) |
|
|
129 | (1) |
|
|
130 | (2) |
|
The Necessity of the Atomic Approach |
|
|
132 | (5) |
|
|
132 | (3) |
|
|
135 | (1) |
|
Wrap-Up on Atomic Operations |
|
|
136 | (1) |
|
Chapter 9 Final Reflections and Thoughts |
|
|
137 | (10) |
|
The Principle of Division |
|
|
137 | (1) |
|
The Concept of a SQL Template |
|
|
138 | (1) |
|
Writing Horizontally vs. Vertically |
|
|
139 | (1) |
|
|
140 | (1) |
|
Specific Software Applications |
|
|
141 | (1) |
|
SQL Itself Can Be Improved |
|
|
142 | (1) |
|
Performance, Oh Performance! |
|
|
143 | (1) |
|
|
144 | (1) |
|
|
145 | (2) |
Index |
|
147 | |