SQL for Access.pdf

(8553 KB) Pobierz
893814893.026.png
SQ for
Microsoft ® Access
2nd Edition
Cecelia L. Allison
& Neal A. Berkowitz
Wordware Publishing, Inc.
893814893.027.png 893814893.028.png 893814893.029.png 893814893.001.png 893814893.002.png 893814893.003.png 893814893.004.png
 
Library of Congress Cataloging-in-Publication Data
Allison, Cecelia L.
SQL for Microsoft Access / by Cecelia L. Allison and Neal A. Berkowitz. -- 2nd ed.
p. cm.
Includes index.
ISBN-13: 978-1-59822-060-5
ISBN-10: 1-59822-060-8 (pbk.)
1. SQL (Computer program language). 2. Microsoft Access.
I. Berkowitz, Neal.
II. Title.
QA76.73.S67A44 2008
005.75'65--dc22
2008016899
CIP
© 2008, Wordware Publishing, Inc.
All Rights Reserved
1100 Summit Avenue, Suite 102
Plano, Texas 75074
No part of this book may be reproduced in any form or by
any means without permission in writing from
Wordware Publishing, Inc.
Printed in the United States of America
ISBN-13: 978-1-59822-060-5
ISBN-10: 1-59822-060-8
10987654321
0805
Access is a trademark and Microsoft is a registered trademark of Microsoft Corporation in the United States
and/or other countries.
Other brand names and product names mentioned in this book are trademarks or service marks of their
respective companies. Any omission or misuse (of any kind) of service marks or trademarks should not be
regarded as intent to infringe on the property of others. The publisher recognizes and respects all marks used
by companies, manufacturers, and developers as a means to distinguish their products.
This book is sold as is, without warranty of any kind, either express or implied, respecting the contents of
this book and any disks or programs that may accompany it, including but not limited to implied warranties for
the book’s quality, performance, merchantability, or fitness for any particular purpose. Neither Wordware
Publishing, Inc. nor its dealers or distributors shall be liable to the purchaser or any other person or entitywith
respect to any liability, loss, or damage caused or alleged to have been caused directly or indirectly by this book.
All inquiries for volume purchases of this book should be addressed to Wordware
Publishing, Inc., at the above address. Telephone inquiries may be made by calling:
(972) 423-0090
893814893.005.png 893814893.006.png 893814893.007.png 893814893.008.png 893814893.009.png 893814893.010.png 893814893.011.png
 
To my wonderful parents, Willie A. Coney and Rosa D. Coney, my
loving husband, John F. Allison, and my sweet daughter, Kayla
Desiree Allison. You each played a special role in inspiring me to
reach for the stars, stay focused, and work hard. I love you!
Cecelia L. Allison
To my wife, Deborah, who puts up with my idiosyncrasies and is
always there for me. When we got married she promised that I
would never be bored, and she has definitely exceeded that prom-
ise. She is the love of my life and, while I don’t say it often enough,
Ihopethatsheknowsit.
With special thanks to the members of the Metroplex Access
Developers (MAD) group — colleagues and friends who are
always available.
Neal A. Berkowitz
iii
893814893.012.png 893814893.013.png 893814893.014.png 893814893.015.png 893814893.016.png 893814893.017.png 893814893.018.png
 
Contents
Acknowledgments ..............................xiii
Introduction.................................xiv
Chapter 1 The Relational Database Structure ...........1
Introduction..................................1
EarlyFormsofDataStorage .........................3
TheRelationalDatabaseStructure......................4
Tables....................................4
Keys.....................................5
ThePlanningStage..............................6
DataModeling ...............................7
EntitiesandRelationships .......................7
Normalization...............................10
Client/ServerDatabases...........................11
DatabaseManagementSystems.......................11
Summary...................................12
Chapter 2 Structured Query Language and Microsoft Access . . . 15
Introduction..................................15
StructuredQueryLanguage.........................16
SQLVersions...............................16
Switching to Version SQL-92 in Microsoft Access 2007 .......17
Switching to Version SQL-92 in Microsoft Access 2003 .......17
SQLComponents.............................17
SQLSyntax................................18
ThePowerofSQLinMicrosoftAccess...................19
TheQueryWizard.............................19
TheQueryDesignToolandSQLView..................20
OpeningMicrosoftAccessandSwitchingtoSQLView...........21
OpeningMicrosoftAccess ........................21
Switching to SQL View in Microsoft Access 2007 ............23
Switching to SQL View in Microsoft Access 2003 ............25
Summary...................................28
Chapter 3 CreatingTablesandInsertingRecords.........31
Introduction..................................31
TheDataDefinitionLanguageComponent.................32
CREATE TABLE Syntax .........................34
DataTypes..................................36
Example1 ...............................39
iv
893814893.019.png 893814893.020.png 893814893.021.png 893814893.022.png 893814893.023.png 893814893.024.png 893814893.025.png
 
Zgłoś jeśli naruszono regulamin