Beginning Database Design_nodrm.pdf
(
3845 KB
)
Pobierz
Beginning Database
Design
Clare Churcher
Beginning Database Design
Copyright © 2007 by Clare Churcher
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN-13 (pbk): 978-1-59059-769-9
ISBN-10 (pbk): 1-59059-769-9
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Lead Editor: Jonathan Gennick
Technical Reviewer: Stéphane Faroult
Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Gennick,
Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Dominic Shakeshaft, Jim Sumser,
Keir Thomas, Matt Wade
Project Manager: Richard Dal Porto
Copy Edit Manager: Nicole Flores
Copy Editor: Ami Knox
Assistant Production Director: Kari Brooks-Copony
Production Editor: Kelly Gunther
Compositor: Gina Rexrode
Proofreader: Elizabeth Berry
Indexer: John Collin
Artist: April Milne
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail
orders-ny@springer-sbm.com,
or
visit
http://www.springeronline.com.
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley,
CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail
info@apress.com,
or visit
http://www.apress.com.
The information in this book is distributed on an “as is” basis, without warranty. Although every precau-
tion has been taken in the preparation of this work, neither the author(s) nor Apress shall have any
liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly
or indirectly by the information contained in this work.
To Neville
Contents at a Glance
Foreword
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
About the Author
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
About the Technical Reviewer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Acknowledgments
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
■
CHAPTER
■
CHAPTER
■
CHAPTER
■
CHAPTER
■
CHAPTER
■
CHAPTER
■
CHAPTER
■
CHAPTER
■
CHAPTER
■
CHAPTER
■
CHAPTER
■
CHAPTER
1
2
3
4
5
6
7
8
9
10
11
12
What Can Go Wrong
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Guided Tour of the Development Process
. . . . . . . . . . . . . . . . . . . . . . . 11
Initial Requirements and Use Cases
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Learning from the Data Model
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Developing a Data Model
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Generalization and Specialization
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
From Data Model to Relational Schema
. . . . . . . . . . . . . . . . . . . . . . . . 113
Normalization
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
More on Keys and Constraints
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Queries
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
User Interface
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Other Implementations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
■
CONCLUSION
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
■
INDEX
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
v
Contents
Foreword
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
About the Author
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
About the Technical Reviewer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Acknowledgments
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
■
CHAPTER 1
What Can Go Wrong
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Mishandling Keywords and Categories
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Repeated Information
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Designing for a Single Report
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Summary
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
■
CHAPTER 2
Guided Tour of the Development Process
. . . . . . . . . . . . . . . . . 11
Initial Problem Statement
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Analysis and Simple Data Model
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Classes and Objects
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Relationships
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Further Analysis: Revisiting the Use Cases
. . . . . . . . . . . . . . . . . . . . . . . . . . 19
Design
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Implementation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Interfaces for Input Use Cases
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Reports for Output Use Cases
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Summary
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
■
CHAPTER 3
Initial Requirements and Use Cases
. . . . . . . . . . . . . . . . . . . . . . . 31
Real and Abstract Views of a Problem
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Data Minding
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Task Automation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
vii
Plik z chomika:
jonedave3
Inne pliki z tego folderu:
B-29 Superfortress vs Ki-44 - Donald Nijboer.epub
(25672 KB)
B-17 Flying Fortress Units of t - William Hess.epub
(18102 KB)
B00XANZZ4A_EBOK_nodrm.azw3
(31349 KB)
B.R. Bhagwat - Mahabharata.azw3
(20673 KB)
B A Paris - Behind Closed Doors_nodrm.epub
(2167 KB)
Inne foldery tego chomika:
@other-lang
@packed
0
1
2-1
Zgłoś jeśli
naruszono regulamin