Table of Contents

 

Copyright

Brief Table of Contents

Table of Contents

MVP authors and their chapters

Preface

Acknowledgments

About Operation Smile

About this book

About the Editors

About SQL Server MVPs

1. Architecture

Chapter 1. Where are my keys?

Keys in the relational model

The debate

The arguments

Pro artificial keys

Pro natural keys

Additional considerations

Natural keys assist the optimizer

Artificial keys are the de facto standard

Modularity, portability, and foreseeing the future

IDENTITY columns may result in value gaps and “run out” of values

Recommendations

Simplicity and aesthetics

Summary

About the author

Chapter 2. “Yes, we are all individuals” A look at uniqueness in the world of SQL

Introducing uniqueness

Constrained to uniqueness

Primary keys

Unique constraints

Unique indexes

Unique constraint or unique index?

Advantages of the unique index

Advantages of the unique constraint

Uniqueness in results

The good and the bad of DISTINCT

DISTINCT or GROUP BY

Are they needed at all?

Unnecessary grouping

Being guided by “that” error

Summary

About the author