Database Design Solutions
Total Page:16
File Type:pdf, Size:1020Kb
spine=1.10" Wrox Programmer to ProgrammerTM Wrox Programmer to ProgrammerTM Beginning Stephens Database Design Solutions Databases play a critical role in the business operations of most organizations; they’re the central repository for critical information on products, customers, Beginning suppliers, sales, and a host of other essential information. It’s no wonder that Solutions Database Design the majority of all business computing involves database applications. With so much at stake, you’d expect most IT professionals would have a firm understanding of good database design. But in fact most learn through a painful process of trial and error, with predictably poor results. This book provides readers with proven methods and tools for designing efficient, reliable, and secure databases. Author Rod Stephens explains how a database should be organized to ensure data integrity without sacrificing performance. He shares procedures for designing robust, flexible, and secure databases that provide a solid foundation for all of your database applications. The methods and techniques in this book can be applied to any database environment, including Oracle®, Microsoft Access®, SQL Server®, and MySQL®. You’ll learn the basics of good database design and ultimately discover how to design a real-world database. What you will learn from this book ● How to identify database requirements that meet users’ needs ● Ways to build data models using a variety of modeling techniques, including Beginning entity-relational models, user-interface models, and semantic object models ● Tips for understanding the different types of databases, including relational databases, flat files, spreadsheets, XML and object databases Enhance Your Knowledge ● How to refine and tune the design to improve database performance Advance Your Career ● Techniques for understanding the relationship between good application design and database design ● Methods for designing flexible and robust databases that can adapt to business change and growth Database Design ● Ways to design for ease of maintenance and support ● How to avoid common database design mistakes Who this book is for Solutions This book is for anyone interested in learning to design, build, analyze, and understand databases. No previous experience with databases or programs is required. subtitle Wrox Beginning guides are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that will guide you through all the techniques involved. www.wrox.com Recommended Database Management ISBN: 978-0-470-38549-4 Computer Book Categories General Rod Stephens $44.99 USA $48.99 CAN Updates, source code, and Wrox technical support at www.wrox.com spine=1.10" Beginning Programmer to Programmer™ Database Design Solutions Professional Microsoft SQL Server 2008 Integration Services 978-0-470-24795-2 Get more out of This book shows developers how to master the 2008 release of SSIS, covering topics including data warehousing with SSIS, new methods of managing the SSIS platform, and improved techniques for ETL operations. Professional SQL Server 2008 Reporting Services 978-0-470-24201-8 WROX.com This book teaches solutions architects, designers, and developers how to use Microsoft’s reporting platform to create reporting and business intelligence solutions. Professional Microsoft SQL Server 2008 Analysis Services 978-0-470-24798-3 Professional Microsoft SQL Server 2008 Analysis Services shows readers Interact Chapters on Demand how to build data warehouses and multidimensional databases, query databases, and use Analysis Services and other components of SQL Server Take an active role online by participating in Purchase individual book chapters in pdf to provide end-to-end solutions. our P2P forums format Professional Microsoft SQL Server 2008 Programming 978-0-470-25702-9 This updated new edition of Wrox’s best-selling SQL Server book has been Wrox Online Library Join the Community expanded to include coverage of SQL Server 2008’s new datatypes, new indexing structures, manageability features, and advanced time-zone Hundreds of our books are available online Sign up for our free monthly newsletter at handling. through Books24x7.com newsletter.wrox.com Enhance Your Knowledge Professional Microsoft SQL Server 2008 Administration Advance Your Career 978-0-470-24796-9 A how-to guide for experienced database administrators, this book is loaded Wrox Blox Browse with unique tips, tricks, and workarounds for handling the most difficult SQL Server administration issues. The authors discuss Download short informational pieces and Ready for more Wrox? We have books and data capture, performance studio, Query Governor, and new techniques for monitoring and policy management. code to keep you up to date and out of e-books available on .NET, SQL Server, Java, Beginning Microsoft SQL Server 2008 Programming 978-0-470-25701-2 trouble! XML, Visual Basic, C#/ C++, and much more! This comprehensive introduction to SQL Server covers the fundamentals and moves on to discuss how to create and change tables, manage keys, write scripts, work with stored procedures, and much more. Beginning T-SQL with Microsoft SQL Server 2005 and 2008 978-0-470-25703-6 Beginning T-SQL with Microsoft SQL Server 2005 and 2008 provides a comprehensive introduction to the T-SQL programming language, with concrete examples showing how T-SQL works with both SQL Server 2005 and SQL Server 2008. Beginning Database Design Solutions Contact Us. 978-0-470-38549-4 Beginning Database Design Solutions introduces IT professionals—both DBAs and database developers—to database design. We always like to get feedback from our readers. Have a book idea? It explains what databases are, their goals, and why proper design is necessary to achieve those goals. It tells how to decide what should be in a database to meet the application’s requirements. It tells how to structure the database so it gives good Need community support? Let us know by e-mailing [email protected] performance while minimizing the chance for error. Stephens ffirs.tex V3 - 10/03/2008 4:09am Page i Beginning Database Design Solutions Introduction ..................................................................... xxiii Part I: Introduction to Databases and Database Design 1 Chapter 1: Goals of Effective Database Design ..........................................3 Chapter 2: Database Types ......................................................... 23 Chapter 3: Relational Database Fundamentals ........................................ 49 Part II: Database Design Process and Techniques 63 Chapter 4: Understanding User Needs ............................................... 65 Chapter 5: Translating User Needs into Data Models .................................. 89 Chapter 6: Extracting Business Rules............................................... 121 Chapter 7: Normalizing Data ....................................................... 137 Chapter 8: Designing Databases to Support Software Applications ..................... 173 Chapter 9: Common Design Patterns ............................................... 185 Chapter 10: Common Design Pitfalls................................................ 207 Part III: A Detailed Case Study 225 Chapter 11: User Needs and Requirements .......................................... 227 Chapter 12: Building a Data Model ................................................. 245 Chapter 13: Extracting Business Rules ............................................. 263 Chapter 14: Normalization and Refinement .......................................... 273 Part IV: Implementing Databases (with Examples in Access and MySQL) 285 Chapter 15: Microsoft Access ..................................................... 287 Chapter 16: MySQL ............................................................... 313 Part V: Advanced Topics 343 Chapter 17: Introduction to SQL.................................................... 345 Chapter 18: Building Databases with SQL Scripts .................................... 369 Chapter 19: Database Maintenance ................................................ 379 Chapter 20: Database Security..................................................... 389 Appendix A: Exercise Solutions .................................................... 403 Appendix B: Sample Database Designs ............................................. 467 Glossary ......................................................................... 487 Index ........................................................................... 497 Stephens ffirs.tex V3 - 10/03/2008 4:09am Page ii Stephens ffirs.tex V3 - 10/03/2008 4:09am Page iii Beginning Database Design Solutions Stephens ffirs.tex V3 - 10/03/2008 4:09am Page iv Stephens ffirs.tex V3 - 10/03/2008 4:09am Page v Beginning Database Design Solutions Rod Stephens Wiley Publishing, Inc. Stephens ffirs.tex V3 - 10/03/2008 4:09am Page vi Beginning Database Design Solutions Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright 2009 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-0-470-38549-4 Manufactured in the United States of America 10987654321 Library of Congress Cataloging-in-Publication Data Stephens, Rod, 1961- Beginning database design solutions / Rod Stephens. p. cm. Includes index. ISBN 978-0-470-38549-4 (978-0-470-38549-4) 1. Database design. 2. Databases. I. Title. QA76.9.D26S97 2008 005.74 — dc22 2008037282