E-Book, Englisch, 309 Seiten
Celko Joe Celko's Data, Measurements and Standards in SQL
1. Auflage 2009
ISBN: 978-0-08-088445-5
Verlag: Elsevier Science & Techn.
Format: EPUB
Kopierschutz: 6 - ePub Watermark
E-Book, Englisch, 309 Seiten
ISBN: 978-0-08-088445-5
Verlag: Elsevier Science & Techn.
Format: EPUB
Kopierschutz: 6 - ePub Watermark
Joe Celko has looked deep into the code of SQL programmers and found a consistent and troubling pattern - a frightening lack of consistency between their individual encoding schemes and those of the industries in which they operate. This translates into a series of incompatible databases, each one an island unto itself that is unable to share information with others in an age of internationalization and business interdependence. Such incompatibility severely hinders information flow and the quality of company data.
Data, Measurements and Standards in SQL reveals the shift these programmers need to make to overcome this deadlock. By collecting and detailing the diverse standards of myriad industries, and then giving a declaration for the units that can be used in an SQL schema, Celko enables readers to write and implement portable data that can interface to any number of external application systems!
This book doesn't limit itself to one subject, but serves as a detailed synopsis of measurement scales and data standards for all industries, thereby giving RDBMS programmers and designers the knowledge and know-how they need to communicate effectively across business boundaries.
* Collects and details the diverse data standards of myriad industries under one cover, thereby creating a definitive, one-stop-shopping opportunity for database programmers.
* Enables readers to write and implement portable data that can interface to any number external application systems, allowing readers to cross business boundaries and move up the career ladder.
* Expert advice from one of the most-read SQL authors in the world who is well known for his ten years of service on the ANSI SQL standards committee and Readers Choice Award winning column in Intelligent Enterprise.
Joe Celko served 10 years on ANSI/ISO SQL Standards Committee and contributed to the SQL-89 and SQL-92 Standards.
Mr. Celko is author a series of books on SQL and RDBMS for Elsevier/MKP. He is an independent consultant based in Austin, Texas.
He has written over 1200 columns in the computer trade and academic press, mostly dealing with data and databases.
Autoren/Hrsg.
Weitere Infos & Material
1;Front Cover;1
2;Joe Celko's Data, Measurements and Standards in SQL;4
3;Copyright Page;5
4;Contents;6
5;Introduction;14
6;PART 1 HISTORY, STANDARDS, AND DESIGNING DATA;20
6.1;CHAPTER 1 Scales and Measurements;22
6.1.1;1.1. Measurement Theory;23
6.1.1.1;1.1.1. Range, Granularity and Your Instruments;25
6.1.1.2;1.1.2. Range;27
6.1.1.3;1.1.3. Granularity, Accuracy and Precision;27
6.1.2;1.2. Defining a Measurement;29
6.1.3;1.3. Tolerance;30
6.1.3.1;1.3.1. Scale Conversion Errors;31
6.1.4;1.4. Validation;31
6.1.5;1.5. Verification;32
6.1.5.1;1.5.1. Erroneous Values;32
6.1.5.2;1.5.2. Phony Values;33
6.1.5.3;1.5.3. Degree of Trust Versus Risk of Error;33
6.2;CHAPTER 2 Validation;36
6.2.1;2.1. Look-Up Tables;37
6.2.1.1;2.1.1. Auxiliary Tables for Noncomputed Data;39
6.2.2;2.2. Check Digits;40
6.2.2.1;2.2.1. Error Detection Versus Error Correction;41
6.2.2.2;2.2.2. Check Digit Algorithms;41
6.2.3;2.3. Declarations, not Functions, not Procedures;49
6.2.4;2.4. Patterns and Regular Expressions;53
6.2.4.1;2.4.1. Tricks with Patterns;54
6.2.4.2;2.4.2. Results with NULL Values and Empty Strings;56
6.2.4.3;2.4.3. Like is not Equality;56
6.2.4.4;2.4.4. Avoiding the Like Predicate with a Join;57
6.2.4.5;2.4.5. CASE Expressions and Like Predicates;59
6.2.4.6;2.4.6. Similar to Predicates;60
6.2.4.7;2.4.7. Tricks With Strings;61
6.2.4.8;2.4.8. Regular Expression Web Sites;64
6.2.5;2.5. Nondatabase Validation;64
6.3;CHAPTER 3 Data Encoding Schemes;66
6.3.1;3.1. Bad Encoding Schemes;67
6.3.2;3.2. Encoding Scheme Types;70
6.3.2.1;3.2.1. Enumeration Encoding;70
6.3.2.2;3.2.2. Measurement Encoding;71
6.3.2.3;3.2.3. Abbreviation Encoding;72
6.3.2.4;3.2.4. Algorithmic Encoding;72
6.3.2.5;3.2.5. Hierarchical Encoding Schemes;74
6.3.2.6;3.2.6. Vector Encoding;75
6.3.2.7;3.2.7. Concatenation Encoding;76
6.3.3;3.3. Atomic Versus Scalar;77
6.3.4;3.4. Transition States;78
6.3.4.1;3.4.1. State Transitions;78
6.3.4.2;3.4.2. State Transition DDL;79
6.3.4.3;3.4.3. State Transition Tables;80
6.3.4.4;3.4.4. Automatic State Transition Tables;82
6.3.5;3.5. General Guidelines for Designing Encoding Schemes;82
6.3.5.1;3.5.1. Use Existing Encoding Standards;82
6.3.5.2;3.5.2. Allow for Expansion;83
6.3.5.3;3.5.3. Use Explicit Missing Values to Avoid NULLs;83
6.3.5.4;3.5.4. Translate Codes for the End User;84
6.3.5.5;3.5.5. One True Look-up Table;85
6.3.6;3.6. Keep the Codes in the Database;88
6.3.7;3.7. Multiple Character Sets;89
6.4;CHAPTER 4 Scales;90
6.4.1;4.1. Bit Flags are not Scales;91
6.4.1.1;4.1.1. BITs;92
6.4.1.2;4.1.2. BITs and Booleans;93
6.4.1.3;4.1.3. BIT Vectors;94
6.4.1.4;4.1.4. Replacing BITs;95
6.4.2;4.2. Dimensionless Measurements;97
6.4.3;4.3. Types of Scales;97
6.4.3.1;4.3.1. Nominal Scales;98
6.4.3.2;4.3.2. Categorical Scales;98
6.4.3.3;4.3.3. Absolute Scales;100
6.4.3.4;4.3.4. Ordinal Scales;101
6.4.3.5;4.3.5. Rank Scales;102
6.4.3.6;4.3.6. Interval Scales;103
6.4.3.7;4.3.7. Ratio Scales;104
6.4.4;4.4. Using Scales;104
6.4.5;4.5. Scale Conversion;105
6.4.6;4.6. Derived Units;107
6.4.7;4.7. Punctuation and Standard Units;109
6.4.8;4.8. General Guidelines for Using Scales in a Database;111
6.5;CHAPTER 5 Data with Ignorance;114
6.5.1;5.1. Get it Right;114
6.5.2;5.2. Replace Bad Values with a General Dummy Value;115
6.5.3;5.3. Replace Bad Values with a Statistical Dummy Value;115
6.5.4;5.4. Replace Bad Values to Complete a Statistical Distribution;116
6.5.5;5.5. Replace Bad Values with Statistical Profiling;117
6.6;CHAPTER 6 Keys;118
6.6.1;6.1. Uniqueness;118
6.6.2;6.2. A Key Cannot Be NULL;118
6.6.3;6.3. Invariant Or Universally Controlled Values;119
6.6.4;6.4. Surrogate And Physical Locators Keys;120
6.6.4.1;6.4.1. Physical Locators for Performance;121
6.6.4.2;6.4.2. Physical Locators for Lack of a Proper Key;122
6.6.4.3;6.4.3. Trusted Sources;123
7;PART 2 A SAMPLING OF STANDARDS;124
7.1;CHAPTER 7 Dates;126
7.1.1;7.1. ISO-8601 standard;126
7.1.1.1;7.1.1. Year Field;127
7.1.1.2;7.1.2. Month Field;128
7.1.1.3;7.1.3. Week Field;128
7.1.1.4;7.1.4. Day Field;129
7.1.1.5;7.1.5. Time Field;130
7.1.1.6;7.1.6. Time Zones and Daylight Saving Time;131
7.1.2;7.2. Putting it all Together;132
7.1.3;7.3. Durations and Intervals;132
7.1.3.1;7.3.1. Time Intervals;133
7.2;CHAPTER 8 Sex Codes;134
7.2.1;8.1. Sex Codes;134
7.2.2;8.2. Other Sources;136
7.3;CHAPTER 9 Ethnicity and Race Codes;138
7.3.1;9.1. Race Versus Ethnicity;138
7.3.2;9.2. U.K. Ethnic Groups;139
7.4;CHAPTER 10 ISO-3166 and Other Country Codes;142
7.4.1;10.1. ISO 3166-1;142
7.4.2;10.2. ISO 3166-2;142
7.4.3;10.3. ISO 3166-3;143
7.5;CHAPTER 11 Language Codes;144
7.6;CHAPTER 12 Currency Codes;146
7.6.1;12.1. Noncurrency Units;147
7.7;CHAPTER 13 National Identification Numbers;148
7.7.1;13.1. Social Security Numbers;149
7.7.1.1;13.1.1. SSN Area Numbers;149
7.7.1.2;13.1.2. SSN Group Numbers;153
7.7.1.3;13.1.3. SSN Serial Numbers;154
7.7.1.4;13.1.4. SSN Validation;154
7.7.2;13.2. Social Insurance Number;155
7.7.2.1;13.2.1. SIN First Digit;155
7.7.2.2;13.2.2. SIN Validation;156
7.7.3;13.3. Swedish Personal Identity Number;156
7.7.3.1;13.3.1. Personnummer Format;156
7.7.4;13.4. Eu Biometric Passports;157
7.7.4.1;13.4.1. Fingerprint Classification Systems;158
7.8;CHAPTER 14 Occupations;160
7.8.1;14.1. National Occupational Classification (NOC);161
7.9;CHAPTER 15 Colors;164
7.9.1;15.1. International Color Consortium;165
7.10;CHAPTER 16 Telephone Numbers;166
7.10.1;16.1. The International Telephone Number Components;166
7.10.2;16.2. Subscriber Local Exchange or Prefix;168
7.11;CHAPTER 17 E-Mail Addresses;170
7.12;CHAPTER 18 Universal Postal Union;172
7.12.1;18.1. ZIP Code;173
7.12.1.1;18.1.1. Basic ZIP Code;173
7.12.1.2;18.1.2. ZIP + 4;173
7.12.1.3;18.1.3. Postal Zone Charts;174
7.12.1.4;18.1.4. ZIP Code Validation;175
7.12.2;18.2. Canadian Postal Codes;175
7.12.3;18.3. Postcodes in the United Kingdom;177
7.12.3.1;18.3.1. Postcode Formats;177
7.12.3.2;18.3.2. Greater London Postcodes;178
7.12.4;18.4. Case Expression for Many International Postal Codes;179
7.13;CHAPTER 19 Hierarchical Triangular Mesh;182
7.14;CHAPTER 20 Shoe Sizes;186
7.15;CHAPTER 21 International Clothing Sizes;188
7.16;CHAPTER 22 ICD Codes;192
7.16.1;22.1. Local Versions;192
7.16.2;22.2. Mental and Behavioral Disorders;193
7.17;CHAPTER 23 Vehicle Identification Number (VIN);194
7.17.1;23.1. Vin Format;194
7.18;CHAPTER 24 Freight Containers;198
7.18.1;24.1. Freight Container Codes;198
7.18.1.1;24.1.1. Map Letters to Numeric Values;199
7.18.1.2;24.1.2. Assign Weights to Each Position;199
7.18.1.3;24.1.3. Compute the Check Digit from the Weighted Sum;199
7.18.2;24.2. Size and Type Codes;199
7.18.3;24.3. Related ISO Standards;199
7.19;CHAPTER 25 Credit Card Numbers;202
7.19.1;25.1. Card Issuers;202
7.19.2;25.2. Account Number;203
7.19.3;25.3. Other Numbers;203
7.19.4;25.4. Personal Identification Numbers;204
7.19.5;25.5. PCI DSS and Related Standards;204
7.19.6;25.6. Tools and More Information;205
7.20;CHAPTER 26 SWIFT And Related Banking Standards;206
7.20.1;26.1. BIC Codes;207
7.20.2;26.2. International Bank Account Number (IBAN);208
7.20.2.1;26.2.1. IBAN Check Digits;209
7.21;CHAPTER 27 Data Universal Numbering System;212
7.22;CHAPTER 28 Global Trade Item Number;214
7.22.1;28.1. GTIN Family;215
7.22.1.1;28.1.1. Prefixes for UPC;215
7.22.2;28.2. ISBN;216
7.23;CHAPTER 29 Digital Object Identifier (DOI);218
7.23.1;29.1. DOI Syntax;218
7.23.2;29.2. ISBN-A;220
7.24;CHAPTER 30 Audiovisual Media;222
7.24.1;30.1. Format;223
7.24.1.1;30.1.1. Root;223
7.24.1.2;30.1.2. Episode or Part;223
7.24.1.3;30.1.3. Version;223
7.24.2;30.2. Cataloging AV Materials;224
7.25;CHAPTER 31 Isin And Related Securities Identifiers;226
7.25.1;31.1. Cusip;227
7.25.2;31.2. Sedol and Other Countries;228
7.25.3;31.3. Classification of Financial Instruments;228
7.26;CHAPTER 32 Temperature Scales;230
7.26.1;32.1. Celsius Scale;231
7.26.2;32.2. Fahrenheit Scale;232
7.26.3;32.3. Kelvin Scale;232
7.26.4;32.4. Other Temperature Scales;233
7.26.4.1;32.4.1. Rankine Scale;233
7.26.4.2;32.4.2. Delisle Scale;233
7.26.4.3;32.4.3. Newton Scale;234
7.26.4.4;32.4.4. Réaumur Scale;234
7.26.4.5;32.4.5. Rømer Scale;234
7.27;CHAPTER 33 National Animal Identification System (NAIS);236
7.27.1;33.1. Premises Identification Number (PIN);236
7.27.2;33.2. Animal Identification Number (AIN and GIN);237
7.27.3;33.3. Animal Tracking and other Considerations;240
7.28;CHAPTER 34 Iso 216 Paper Sizes ("A," "B," And "C " Series);242
7.28.1;34.1. "B" Series;243
7.28.2;34.2. "C" Series;244
7.28.3;34.3. Tolerances;244
7.28.4;34.4. Non-ISO Paper Sizes;244
7.29;CHAPTER 35 Compass Points;246
7.29.1;35.1. Traditional Compass Points;246
7.29.2;35.2. Other Compass Point Systems;247
7.30;CHAPTER 36 Unicode;250
7.30.1;36.1. Types of Written Languages;251
7.30.2;36.2. Practical and Political Problems;251
7.30.3;36.3. Normalization;252
7.31;CHAPTER 37 Driver's Licenses;254
7.31.1;37.1. ID-1 Cards;255
7.31.2;37.2. U.S. Driver's Licenses;255
7.31.3;37.3. Enhanced Driver's License (EDL);256
7.32;CHAPTER 38 Currency Units and Near Money;258
7.32.1;38.1. Stock Exchanges and Nondecimal Units;259
7.32.2;38.2. Decimalization in the United Kingdom;259
7.32.3;38.3. Physical Currency Choices;260
7.32.4;38.4. Coupons;262
7.32.4.1;38.4.1. Types of Coupons;263
7.32.4.2;38.4.2. Trade Groups and References;264
7.33;CHAPTER 39 Recipes and Food Preparation;266
7.33.1;39.1. Weight Versus Volume;266
7.33.2;39.2. Scaling a Recipe;267
7.34;CHAPTER 40 Portable Document Format (PDF);268
7.34.1;40.1. ISO 32000;268
7.34.2;40.2. Things that Paper Cannot do;270
7.35;CHAPTER 41 Temporal Data;272
7.35.1;41.1. Notes On Calendar Standards;272
7.35.1.1;41.1.1. The Julian and Gregorian Calendars;273
7.35.1.2;41.1.2. Computerizing Calendars;275
7.35.1.3;41.1.3. Leap Seconds;276
7.35.1.4;41.1.4. Calendar Tables;277
7.35.2;41.2. SQL Temporal Data Types;280
7.35.2.1;41.2.1. Tips for Handling Dates, Timestamps and Times;281
7.35.2.2;41.2.2. Date Format Standards;281
7.35.2.3;41.2.3. Handling Timestamps;282
7.35.2.4;41.2.4. Handling Times;284
7.35.3;41.3. Expressions with Date Arithmetic;286
7.35.4;41.4. The Nature of Temporal Data Models;287
7.35.5;41.5. References on Temporal Data and SQL;288
7.36;CHAPTER 42 Additive Congruential Generators;290
7.37;CHAPTER 43 Traditional and Metric Typographic Units;294
7.37.1;43.1. DIN 16507-2 Font Sizes;296
8;Index;300
8.1;A;300
8.2;B;300
8.3;C;300
8.4;D;301
8.5;E;302
8.6;F;303
8.7;G;303
8.8;H;303
8.9;I;303
8.10;J;305
8.11;K;305
8.12;L;305
8.13;M;305
8.14;N;305
8.15;O;306
8.16;P;306
8.17;Q;307
8.18;R;307
8.19;S;307
8.20;T;308
8.21;U;309
8.22;V;309
8.23;W;310
8.24;X;310
8.25;Y;310
8.26;Z;310