$ 19.99 US£ 12.99 UK € 16.99 EU Prices do not include local sales tax or VAT where applicable Packt Publishing Birmingham - Mumbai www.packtpub.com Creating your MySQL Database: Practic
Trang 1$ 19.99 US
£ 12.99 UK
€ 16.99 EU
Prices do not include local sales tax or VAT where applicable
Packt Publishing Birmingham - Mumbai
www.packtpub.com
Creating your MySQL Database:
Practical Design Tips and Techniques
The popularity of MySQL and phpMyAdmin has brought many non-IT specialists to the field of database design, usually with a view to building a dynamic website with a MySQL back end Most users would be interested mainly in developing a functional website, but would have little interest in learning about good practices in designing their MySQL databases One reason is that MySQL design is seen as an advanced and complex topic that requires a lot of time, which most people would not be able to afford or just would not care to invest This book attempts to overcome this barrier, which is both perceptional and real, by positioning itself as a fast and easy way to learn the most important aspects of MySQL database design
What you will learn from this book
• Asking users the right questions when collecting relevant data for the system you are building
• Detecting bad structures
• Sound data naming techniques, both for table and column names
• Modeling data with future growth in mind
• Implementing security policies with data privileges and views
• Tuning the structure for performance
• Producing system documentation (data dictionary, relational schema)
• Testing the model with appropriate SQL queries
Who this book is written for
This book is for new web developers and MySQL database administrators who want to learn how to build better data structures A basic understanding of MySQL and SQL is assumed
F r o m T e c h n o l o g i e s t o S o l u t i o n s
Creating your
MySQL Database
Practical Design Tips and Techniques
A short guide for everyone on how to structure their data and set up their MySQL database tables efficiently and easily
Marc Delisle
www.dbeBooks.com - An Ebook Library
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 2Creating your MySQL Database: Practical Design Tips and
Techniques
A short guide for everyone on how to structure their
data and set up their MySQL database tables efficiently and easily
Marc Delisle
BIRMINGHAM - MUMBAI
Trang 3Creating your MySQL Database: Practical Design Tips and Techniques
Copyright © 2006 Packt Publishing
All rights reserved No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented However, the information contained in this book is sold without warranty, either express or implied Neither the author, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to
be caused directly or indirectly by this book
Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals However, Packt Publishing cannot guarantee the accuracy of this information
First published: November2006
Production Reference: 1141106
Published by Packt Publishing Ltd
32 Lincoln Road
Olton
Birmingham, B27 6PA, UK
ISBN 1-904811-30-2
www.packtpub.com
Cover Image by www.visionwt.com
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 4Author
Marc Delisle
Reviewer
Rudy Limeback
Development Editor
Louay Fatoohi
Assistant Development Editor
Nikhil Bangera
Technical Editor
Mithil Kulkarni
Editorial Manager
Dipali Chittar
Project Manager
Patricia Weir
Indexer
Bhushan Pangaonkar
Proofreader
Martin Brooks
Layouts and Illustrations
Shantanu Zagade
Cover Designer
Shantanu Zagade
Trang 5About the Author
Marc Delisle is a member of the MySQL Developers Guild, which regroups community developers — because of his involvement with phpMyAdmin He started to contribute to this popular MySQL web interface in December 1998, when
he made the first multi-language version He has been actively involved with the phpMyAdmin project since May 2001 as a developer and project administrator
He has worked since 1980 at Collège de Sherbrooke, Québec, Canada, as an
application programmer and network manager He has also been teaching
networking, security, Linux servers, and PHP/MySQL application development
I would like to thank the whole Packt team for their support, especially Louay Fatoohi and Nikhil Bangera; their advice helped shaping this book My thanks also go to Rudy Limeback for his insight
The developers of the MySQL software have earned my respect; may they find here my warm gratitude for their excellent product
I hope that this book will assist readers into building effective data structures
To Carole, André, Corinne, Annie, and Guillaume, with all my love.
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 6About the Reviewer
Rudy Limeback is an SQL Consultant with close to 20 years of experience using SQL in one database system or another He is located in Toronto, Canada but, thanks to the miracle that is the Internet, consults for clients all over the wide world More information on SQL and Web development can be found on Rudy's website, http://www.r937.com/
Trang 8Table of Contents
Trang 9Table of Contents
[ ii ]
Existing Information Systems 21 Chronological Events 22 Sources and Destinations 22
Clarity versus Length: an Art 35
Simpo PDF Merge and Split Unregistered Version - http://www.simpopdf.com
Trang 10[ iii ]
Helping the Query Optimizer: Analyze Table 60