Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Addison-Wesley was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals.
The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein.
The publisher offers discounts on this book when ordered in quantity for bulk purchases and special sales. For more information, please contact:
U.S. Corporate and Government Sales
For sales outside of the U.S., please contact:
Visit Addison-Wesley on the Web: www.awprofessional.com
Library of Congress Cataloging-in-Publication Data
Hernandez, Michael J. (Michael James), 1955
Database design for mere mortals : a hands-on guide to relational database design / Michael J. Hernandez2nd ed.
Includes bibliographic references and index.
ISBN 0-201-75284-0 (alk. paper)
1. Database design. 2. Relational databases. I. Title.
QA76.9.D26 H477 2003
Copyright 2003 by Michael J. Hernandez.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise , without the prior consent of the publisher. Printed in the United States of America. Published simultaneously in Canada.
For information on obtaining permission for use of material from this work, please submit a written request to:
Pearson Education, Inc.
Rights and Contracts Department
75 Arlington Street, Suite 300
Boston, MA 02116
Fax: (617) 848-7047
Text printed on recycled paper
1 2 3 4 5 6 7 8 9 10CRS0706050403
First printing, March 2003
For my wife, Kendra, who has always believed in me.
In loving memory of our cats, Chico and Bugs. Writing just isn't the same without them.
Dedicated to anyone who has unsuccessfully attempted to design a relational database .
Praise for Database Design for Mere Mortals , Second Edition
"This book takes the somewhat daunting process of database design and breaks it into completely manageable and understandable components . Mike's approach whilst simple is completely professional, and I can recommend this book to any novice database designer."
Sandra Barker, Lecturer, University of South Australia, Australia
"Databases are a critical infrastructure technology for information systems and today's business. Mike Hernandez has written a literate explanation of database technologya topic that is intricate and often obscure. If you design databases yourself, this book will educate you about pitfalls and show you what to do. If you purchase products that use a database, the book explains the technology so that you can understand what the vendor is doing and assess their products better."
Michael Blaha, consultant and trainer, author of A Manager's Guide to Database Technology
"If you told me that Mike Hernandez could improve on the first edition of Database Design for Mere Mortals I wouldn't have believed you, but he did! The second edition is packed with more real-world examples, detailed explanations , and even includes database-design tools on the CD-ROM! This is a must-read for anyone who is even remotely interested in relational database design, from the individual who is called upon occasionally to create a useful tool at work, to the seasoned professional who wants to brush up on the fundamentals. Simply put, if you want to do it right, read this book!"
Matt Greer, Process Control Development, The Dow Chemical Company
"Mike's approach to database design is totally common-sense based, yet he's adhered to all the rules of good relational database design. I use Mike's books in my starter database-design class, and I recommend his books to anyone who's interested in learning how to design databases or how to write SQL queries."
Michelle Poolet, President, MVDS, Inc.
"Slapping together sophisticated applications with poorly designed data will hurt you just as much now as when Mike wrote his first edition, perhaps even more. Whether you're just getting started developing with data or are a seasoned pro; whether you've read Mike's previous book or this is your first; whether you're happier letting someone else design your data or you love doing it yourselfthis is the book for you. Mike's ability to explain these concepts in a way that's not only clear, but fun, continues to amaze me."
From the Foreword by Ken Getz, MCW Technologies, coauthor ASP.NET Developer's JumpStart
"The first edition of Mike Hernandez's book Database Design for Mere Mortals was one of the few books that survived the cut when I moved my office to smaller quarters . The second edition expands and improves on the original in so many ways. It is not only a good, clear read, but contains a remarkable quantity of clear, concise thinking on a very complex subject. It's a must for anyone interested in the subject of database design."
Malcolm C. Rubel, Performance Dynamics Associates
"Mike's excellent guide to relational database design deserves a second edition. His book is an essential tool for fledgling Microsoft Access and other desktop database developers, as well as for client/server pros. I recommend it highly to all my readers."
Roger Jennings, author of Special Edition Using Access 2002
"There are no silver bullets! Database technology has advanced dramatically, the newest crop of database servers perform operations faster than anyone could have imagined six years ago, but none of these technological advances will help fix a bad database design, or capture data that you forgot to include! Database Design for Mere Mortals , Second Edition , helps you design your database right in the first place!"
Matt Nunn, Product Manager, SQL Server, Microsoft Corporation
"When my brother started his professional career as a developer, I gave him Mike's book to help him understand database concepts and make real-world application of database technology. When I need a refresher on the finer points of database design, this is the book I pick up. I do not think that there is a better testimony to the value of a book than that it gets used. For this reason I have wholeheartedly recommended to my peers and students that they utilize this book in their day-to-day development tasks ."
Chris Kunicki, Senior Consultant, OfficeZealot.com
"Mike has always had an incredible knack for taking the most complex topics, breaking them down, and explaining them so that anyone can 'get it.' He has honed and polished his first very, very good edition and made it even better. If you're just starting out building database applications, this book is a must-read cover to cover. Expert designers will find Mike's approach fresh and enlightening and a source of great material for training others."
John Viescas, President, Viescas Consulting, Inc., author of Running Microsoft Access 2000 and coauthor of SQL Queries for Mere Mortals
"Whether you need to learn about relational database design in general, design a relational database, understand relational database terminology, or learn best practices for implementing a relational database, Database Design for Mere Mortals , Second Edition , is an indispensable book that you'll refer to often. With his many years of real-world experience designing relational databases, Michael shows you how to analyze and improve existing databases, implement keys, define table relationships and business rules, and create data views, resulting in data integrity, uniform access to data, and reduced data-entry errors."
Paul Cornell, Site Editor, MSDN Office Developer Center