0% found this document useful (0 votes)
1 views

Professional SQL Server 2005 Programming Robert Vieira pdf download

The document provides information about the book 'Professional SQL Server 2005 Programming' by Robert Vieira, including details such as the ISBN, publication year, and a brief overview of its contents. It also includes links to other related SQL Server books available for download. The author shares his background and experience in database programming and acknowledges those who contributed to the book's development.

Uploaded by

mqvtjqkg852
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Professional SQL Server 2005 Programming Robert Vieira pdf download

The document provides information about the book 'Professional SQL Server 2005 Programming' by Robert Vieira, including details such as the ISBN, publication year, and a brief overview of its contents. It also includes links to other related SQL Server books available for download. The author shares his background and experience in database programming and acknowledges those who contributed to the book's development.

Uploaded by

mqvtjqkg852
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

Professional SQL Server 2005 Programming Robert

Vieira download pdf

https://ebookultra.com/download/professional-sql-
server-2005-programming-robert-vieira/

Visit ebookultra.com today to download the complete set of


ebook or textbook!
Here are some recommended products for you. Click the link to
download, or explore more at ebookultra.com

Mastering SQL Server 2005 Reporting Services


Infrastructure Design 1st Edition Joseph L. Jorden

https://ebookultra.com/download/mastering-sql-server-2005-reporting-
services-infrastructure-design-1st-edition-joseph-l-jorden/

Professional Microsoft SQL Server 2012 Integration


Services 1. Auflage Edition Brian Knight

https://ebookultra.com/download/professional-microsoft-sql-
server-2012-integration-services-1-auflage-edition-brian-knight/

Beginning SQL Server 2000 DBA From Novice to Professional


1st Edition Tony Bain

https://ebookultra.com/download/beginning-sql-server-2000-dba-from-
novice-to-professional-1st-edition-tony-bain/

Professional Microsoft SQL Server 2008 Administration Wrox


Programmer to Programmer 1st Edition Brian Knight

https://ebookultra.com/download/professional-microsoft-sql-
server-2008-administration-wrox-programmer-to-programmer-1st-edition-
brian-knight/
SQL Server T SQL Recipes 4th Edition Jason Brimhall

https://ebookultra.com/download/sql-server-t-sql-recipes-4th-edition-
jason-brimhall/

Programming Microsoft SQL Server 2000 with Microsoft


Visual Basic NET 1st edition Edition Rick Dobson

https://ebookultra.com/download/programming-microsoft-sql-
server-2000-with-microsoft-visual-basic-net-1st-edition-edition-rick-
dobson/

Microsoft SQL Server 2012 T SQL 1st Edition Tom Coffing

https://ebookultra.com/download/microsoft-sql-server-2012-t-sql-1st-
edition-tom-coffing/

Protecting SQL Server Data John Magnabosco

https://ebookultra.com/download/protecting-sql-server-data-john-
magnabosco/

Designing SQL Server 2000 Databases for Net Enterprise


Servers 1st Edition Robert A. Patton

https://ebookultra.com/download/designing-sql-server-2000-databases-
for-net-enterprise-servers-1st-edition-robert-a-patton/
Professional SQL Server 2005 Programming Robert
Vieira Digital Instant Download
Author(s): Robert Vieira
ISBN(s): 9780764584343, 0764584340
Edition: illustrated edition
File Details: PDF, 17.80 MB
Year: 2007
Language: english
01_584340 ffirs.qxp 10/18/06 2:10 PM Page i

Professional
SQL Server™ 2005 Programming

Robert Vieira
01_584340 ffirs.qxp 10/18/06 2:10 PM Page ii

Professional SQL Server™ 2005 Programming


Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2007 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN-13: 978-0-7645-8434-3
ISBN-10: 0-7645-8434-0
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
1B/QW/RR/QW/IN
Library of Congress Cataloging-in-Publication Data:
Vieira, Robert.
Professional SQL server 2005 programming / Robert Vieira.
p. cm.
ISBN-13: 978-0-7645-8434-3 (paper/website)
ISBN-10: 0-7645-8434-0 (paper/website)
1. Client/server computing. 2. SQL server. I. Title.
QA76.9.C55V55 2006
005.2’768—dc22
2006023047
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, scanning or otherwise, except as permitted under Sections
107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or
authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood
Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be
addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317)
572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permissions.

LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REP-
RESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CON-
TENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT
LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED
OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED
HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTAND-
ING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFES-
SIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT
PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE
LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS
REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMA-
TION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE
ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READ-
ERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DIS-
APPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.
For general information on our other products and services please contact our Customer Care Department within
the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are
trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other
countries, and may not be used without written permission. SQL Server is a trademark of Microsoft Corporation in
the United States and/or other countries. All other trademarks are the property of their respective owners. Wiley
Publishing, Inc., is not associated with any product or vendor mentioned in this book.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be
available in electronic books.
01_584340 ffirs.qxp 10/18/06 2:10 PM Page iii

Credits
Executive Editor Vice President and Executive Group Publisher
Bob Elliott Richard Swadley

Senior Development Editor Vice President and Executive Publisher


Kevin Kent Joseph B. Wikert

Technical Editor Graphics and Production Specialists


John Mueller Denny Hager, Jennifer Mayberry, Barbara Moore,
Lynsey Osborn, Heather Ryan, Alicia B. South,
Production Editor Ronald Terry
Pamela Hanley
Quality Control Technician
Copy Editor John Greenough
Foxxe Editorial Services
Project Coordinators
Editorial Manager Michael Kruzil, Kristie Rees
Mary Beth Wakefield
Proofreading and Indexing
Production Manager Techbooks
Tim Tate

About the Author


Experiencing his first infection with computing fever in 1978, Robert Vieira knew right away that this
was something “really cool.” In 1980 he began immersing himself into the computing world more
fully—splitting his time between building and repairing computer kits and programming in BASIC as
well as Z80 and 6502 Assembly. In 1983, he began studies for a degree in Computer Information
Systems, but found the professional mainframe environment too rigid for his tastes and dropped out
in 1985 to pursue other interests. Later that year, he caught the “PC bug” and began the long road of
programming in database languages from dBase to SQL Server. Rob completed a degree in business
administration in 1990 and since has typically worked in roles that allow him to combine his unique
knowledge of business and computing. Beyond his bachelor’s degree, he has been certified as a
Certified Management Accountant; Microsoft Certified as a Solutions Developer (MCSD), Trainer
(MCT), and Database Administrator (MCDBA); and even had a brief stint certified as an emergency
medical technician (EMT).

Rob is currently self-employed as a high-level consultant specializing in architectural analysis, long-term


planning, and product viability analysis and is recognized internationally for his expertise in database
architecture and management. He has published four books on SQL Server development.

He resides with his daughters Ashley and Adrianna in Vancouver, Washington.


01_584340 ffirs.qxp 10/18/06 2:10 PM Page iv

This book is dedicated with all my heart to my children Ashley and Addy,
who put up with me “disappearing” into my home office during the
several months that I worked on this book. They provide the energy
that powers my writing, and I love them to no end. I only wish
Wrox would let me print a picture of the two women
in my life on the cover of this book rather than my ugly mug.
01_584340 ffirs.qxp 10/18/06 2:10 PM Page v

Acknowledgments

Nearly six years have gone by since I finished my first book on SQL Server, and my how life has
changed. It’s been only a few months since I completed the new Beginning SQL Server 2005 Programming
title that is something of a companion to this book, yet there remain quite a few people to thank in that
time (and before for that matter).

I’ll start with my kids, who somehow continue to be just wonderful even in the face of dad stressing out
over this and that. It’s nice to be able to tell my youngest that I’m finally “done with that book” that she
has asked me the “when?” question about for over a year now (I’m not sure she has completely gotten
the idea that there have been two this time around). She has been tremendously patient with me all dur-
ing the development of this as well as the Beginning book. I think I’ll miss that occasional time that she
would come in and just sit and watch me write just to be with me. Having just watched my eldest grad-
uate high school, I wonder where the years have gone. The “thank you’s” definitely need to begin with
those two.

You—the readers. You’ve written me mail and told me how I helped you out in some way. That was and
continues to be the number one reason I find to strength to write another book. The continued support
of my Professional series titles has been amazing. We struck a chord—I’m glad. Here’s to hoping we help
make your SQL Server experience a little less frustrating and a lot more successful.

I also want to pay special thanks to several people past and present. Some of these are at the old Wrox
Press and have long since fallen out of contact, but they remain so much of who I am as I writer that I
need to continue to remember them. Others are new players for me, but have added their own stamp to
the mix—sometimes just by showing a little patience:

Kate Hall—Who, although she was probably ready to kill me by the end of each of my first two books,
somehow guided me through the editing process to build a better book each time. I have long since
fallen out of touch with Kate, but she will always be the most special to me as someone who really
helped shape my writing career. I will likely always hold this first “professional” dedication spot for her.
Wherever you are Kate, I hope you are doing splendidly.

Adaobi Obi Tulton—Who has had enough of her own stresses this year, so my apologies go out to her
for all the stress I’ve placed in her regarding delivery schedules. If I ever make it rich, I may hire Adaobi
as my spiritual guide. While she can be high stress about deadlines, she has a way of displaying a kind
of “peace” in just about everything else I’ve seen her do—I need to learn that.

Bob Elliott—Mostly just a “thanks for hanging in there”—he’ll understand what I mean.

Kevin Kent—Who had to pick up in the middle and shepherd things along.

Dominic Shakeshaft—Who got me writing in the first place (then again, given some nights filled with
writing instead of sleep lately, maybe it’s not thanks I owe him).
01_584340 ffirs.qxp 10/18/06 2:10 PM Page vi

Acknowledgments
Catherine Alexander—Who played Kate’s more than able-bodied sidekick for my first title and was cen-
tral to round two. Catherine was much like Kate in the sense she had a significant influence on the shape
and success of my first two titles.

John Mueller—Who had the dubious job of finding my mistakes. I’ve done tech editing myself, and it’s
not the easiest job to notice the little details that were missed or are, in some fashion, wrong. It’s even
harder to read someone else’s writing style and pick the right times to say, “You might want to approach
this differently” and the right times to let it be. John did a terrific job on both counts.

There are not quite as many other players in this title as there have been in my previous titles, but this
book has been in development for so long and touched enough people that I’m sure I’ll miss one or two—
if you’re among those missed, please accept my humblest apologies and my assurance that your help was
appreciated. That said, people who deserve some additional thanks (some of these go to influences from
WAY back) include Paul Turley, Greg Beamer, Itzik Ben-Gan, Kalen Delaney, Fernando Guerrero,
Gert Drapers, and especially Richard Waymire.

vi
02_584340 ftoc.qxp 10/18/06 2:10 PM Page vii

Contents

Acknowledgments v
Introduction xxiii

Chapter 1: Being Objective: Re-Examining Objects in SQL Server 1


So, What Exactly Do We Have Here? 1
An Overview of Database Objects 2
The Database Object 2
The Transaction Log 5
The Most Basic Database Object: Table 5
Schemas 6
Filegroups 7
Diagrams 7
Views 7
Stored Procedures 9
User-Defined Functions 9
Users and Roles 10
Rules 10
Defaults 10
User-Defined Data Types 10
Full-Text Catalogs 11
SQL Server Data Types 11
NULL Data 14
SQL Server Identifiers for Objects 15
What Gets Named? 15
Rules for Naming 15
Summary 16

Chapter 2: Tool Time 17


Books Online 18
The SQL Server Configuration Manager 19
Service Management 19
Network Configuration 20
The Protocols 21
On to the Client 23
02_584340 ftoc.qxp 10/18/06 2:10 PM Page viii

Contents
The SQL Server Management Studio 24
Getting Started 25
Query Window 27
SQL Server Business Intelligence Development Studio 32
SQL Server Integration Services (SSIS) 32
Reporting Services 33
Bulk Copy Program (bcp) 33
SQL Server Profiler 33
sqlcmd 34
Summary 34

Chapter 3: Basic T-SQL 35


The Basic SELECT Statement 36
The SELECT Statement and FROM Clause 36
The JOIN Clause 38
The WHERE Clause 45
ORDER BY 49
Aggregating Data Using the GROUP BY Clause 52
Placing Conditions on Groups with the HAVING Clause 56
Outputting XML Using the FOR XML Clause 57
Making Use of Hints Using the OPTION Clause 57
DISTINCT 57
Adding Data with the INSERT Statement 59
The INSERT INTO . . . SELECT Statement 61
Changing What You’ve Got with the UPDATE Statement 62
The DELETE Statement 64
Exploring Alternative Syntax for Joins 66
An Alternative INNER JOIN 67
An Alternative OUTER JOIN 67
An Alternative CROSS JOIN 68
The UNION 69
Summary 72

Chapter 4: Creating and Altering Tables 73


Object Names in SQL Server 73
Schema Name (a.k.a. Ownership) 74
The Database Name 76
Naming by Server 76
The CREATE Statement 77
CREATE DATABASE 77
CREATE TABLE 82

viii
02_584340 ftoc.qxp 10/18/06 2:10 PM Page ix

Contents
The ALTER Statement 89
ALTER DATABASE 89
ALTER TABLE 92
The DROP Statement 95
Using the GUI Tool 96
Creating or Editing the Database 96
Creating and Editing Tables 97
Summary 99

Chapter 5: Reviewing Keys and Constraints 101


Types of Constraints 102
Domain Constraints 103
Entity Constraints 103
Referential Integrity Constraints 104
Constraint Naming 104
Key Constraints 105
PRIMARY KEY Constraints 106
FOREIGN KEY Constraints 108
UNIQUE Constraints 117
CHECK Constraints 118
DEFAULT Constraints 119
Defining a DEFAULT Constraint in Your CREATE TABLE Statement 120
Adding a DEFAULT Constraint to an Existing Table 121
Disabling Constraints 121
Ignoring Bad Data When You Create the Constraint 122
Temporarily Disabling an Existing Constraint 124
Rules and Defaults: Cousins of Constraints 126
Rules 126
Defaults 128
Determining Which Tables and Data Types Use a Given Rule or Default 129
Triggers for Data Integrity 129
Choosing What to Use 129
Summary 131

Chapter 6: Asking a Better Question: Advanced Queries 133


What Is a Subquery? 134
Building a Nested Subquery 135
Nested Queries Using Single Value SELECT Statements 136
Nested Queries Using Subqueries That Return Multiple Values 137
The ANY, SOME, and ALL Operators 138

ix
02_584340 ftoc.qxp 10/18/06 2:10 PM Page x

Contents
Correlated Subqueries 139
How Correlated Subqueries Work 140
Correlated Subqueries in the WHERE Clause 140
Correlated Subqueries in the SELECT List 142
Derived Tables 144
The EXISTS Operator 146
Using EXISTS in Other Ways 147
Mixing Data Types: CAST and CONVERT 148
Using External Calls to Perform Complex Actions 150
Performance Considerations 151
JOINs vs. Subqueries vs. ? 152
Summary 153

Chapter 7: Daring to Design 155


Normalization 201 155
Where to Begin 156
Getting to Third Normal Form 157
Other Normal Forms 157
Relationships 158
Diagramming 159
A Couple of Relationship Types 160
The Entity Box 160
The Relationship Line 161
Terminators 162
Logical versus Physical Design 165
Purpose of a Logical Model 165
Parts of a Logical Model 166
Dealing with File-Based Information 168
Subcategories 171
Types of Subcategories 172
Keeping Track of What’s What — Implementing Subcategories 173
Getting Physical — The Physical Implementation of Subcategories 175
Adding to Extensibility with Subcategories 176
Database Reuse 177
Candidates for Reusable Databases 177
How to Break Things Up 178
The High Price of Reusability 179
De-Normalization 179
Partitioning for Scalability 180

x
02_584340 ftoc.qxp 10/18/06 2:10 PM Page xi

Contents
The SQL Server Diagramming Tools 181
Tables 183
Dealing with Constraints 185
Summary 187

Chapter 8: SQL Server — Storage and Index Structures 189


SQL Server Storage 189
The Database 189
The File 190
The Extent 190
The Page 191
Rows 193
Full-Text Catalogs 194
Understanding Indexes 194
To “B,” or Not to “B”: B-Trees 195
How Data Is Accessed in SQL Server 199
Index Types and Index Navigation 200
Creating, Altering, and Dropping Indexes 208
The CREATE INDEX Statement 208
Creating XML Indexes 214
Implied Indexes Created with Constraints 215
ALTER INDEX 215
DROP INDEX 218
Choosing Wisely: Deciding What Index Goes Where and When 218
Selectivity 218
Watching Costs: When Less Is More 219
Choosing That Clustered Index 219
Column Order Matters 222
Dropping Indexes 222
Use the Database Engine Tuning Advisor 222
Maintaining Your Indexes 223
Fragmentation 223
Identifying Fragmentation 224
Summary 228

Chapter 9: Views 231


Simple Views 232
More Complex Views 233
Using a View to Change Data — Before INSTEAD OF Triggers 236
Editing Views with T-SQL 237

xi
02_584340 ftoc.qxp 10/18/06 2:10 PM Page xii

Contents
Dropping Views 238
Auditing: Displaying Existing Code 238
Protecting Code: Encrypting Views 239
About Schema Binding 241
Making Your View Look Like a Table with VIEW_METADATA 241
Indexed (Materialized) Views 242
Partitioned Views 244
Summary 244

Chapter 10: Scripts and Batches 247


Script Basics 248
The USE Statement 248
Declaring Variables 249
Using @@IDENTITY 252
Using @@ROWCOUNT 252
Batches 253
Errors in Batches 255
When to Use Batches 256
SQLCMD 259
Dynamic SQL: Generating Your Code on the Fly with the EXEC Command 260
The Gotchas of EXEC 262
Control-of-Flow Statements 265
The IF . . . ELSE Statement 266
The CASE Statement 270
Looping with the WHILE Statement 275
The WAITFOR Statement 277
TRY/CATCH Blocks 277
Summary 280

Chapter 11: Getting Procedural: Stored Procedures and User-Defined


Functions 281
Creating the Sproc: Basic Syntax 282
An Example of a Basic Sproc 282
Changing Stored Procedures with ALTER 283
Dropping Sprocs 283
Parameterization 284
Declaring Parameters 284
Creating Output Parameters 285
Confirming Success or Failure with Return Values 288
How to Use RETURN 288

xii
02_584340 ftoc.qxp 10/18/06 2:10 PM Page xiii

Contents
Dealing with Errors 290
The Way We Were 291
Manually Raising Errors 296
Adding Your Own Custom Error Messages 299
What a Sproc Offers 301
Creating Callable Processes 301
Using Sprocs for Security 301
Sprocs and Performance 302
Extended Stored Procedures (XPs) 304
A Brief Look at Recursion 305
User-Defined Functions (UDFs) 307
What a UDF Is 308
UDFs Returning a Scalar Value 308
UDFs That Return a Table 310
Understanding Determinism 316
Debugging 317
Setting Up SQL Server for Debugging 318
Starting the Debugger 318
Parts of the Debugger 321
Using the Debugger after It’s Started 322
Summary 327

Chapter 12: Transactions and Locks 329


Transactions 329
BEGIN TRAN 331
COMMIT TRAN 331
ROLLBACK TRAN 331
SAVE TRAN 331
How the SQL Server Log Works 336
Using the CHECKPOINT Command 337
CHECKPOINT on Recovery 337
At Normal Server Shutdown 338
At a Change of Database Options 338
When the Truncate on Checkpoint Option Is Active 338
When Recovery Time Would Exceed the Recovery Interval Option Setting 339
Failure and Recovery 339
Implicit Transactions 340
Locks and Concurrency 341
What Problems Can Be Prevented by Locks 342
Lockable Resources 346
Lock Escalation and Lock Effects on Performance 346

xiii
02_584340 ftoc.qxp 10/18/06 2:10 PM Page xiv

Contents
Lock Modes 347
Lock Compatibility 349
Specifying a Specific Lock Type — Optimizer Hints 349
Setting the Isolation Level 353
READ COMMITTED 353
READ UNCOMMITTED 354
REPEATABLE READ 354
SERIALIZABLE 355
Dealing with Deadlocks (a.k.a. “A 1205”) 355
How SQL Server Figures Out There’s a Deadlock 356
How Deadlock Victims Are Chosen 356
Avoiding Deadlocks 356
Summary 358

Chapter 13: Triggers 361


What Is a Trigger? 362
ON 363
WITH ENCRYPTION 363
The FOR|AFTER versus the INSTEAD OF Clause 364
WITH APPEND 366
NOT FOR REPLICATION 367
AS 367
Using Triggers for Data Integrity Rules 367
Dealing with Requirements Sourced from Other Tables 367
Using Triggers to Check the Delta of an Update 369
Using Triggers for Custom Error Messages 371
Other Common Uses for Triggers 372
Updating Summary Information 372
Feeding Data into De-normalized Tables for Reporting 372
Setting Condition Flags 373
Other Trigger Issues 375
Triggers Can Be Nested 376
Triggers Can Be Recursive 376
Debugging Triggers 376
Triggers Don’t Get in the Way of Architecture Changes 377
Triggers Can Be Turned Off without Being Removed 377
Trigger Firing Order 378
INSTEAD OF Triggers 380
INSTEAD OF INSERT Triggers 381
INSTEAD OF UPDATE Triggers 384
INSTEAD OF DELETE Triggers 384

xiv
02_584340 ftoc.qxp 10/18/06 2:10 PM Page xv

Contents
IF UPDATE() and COLUMNS_UPDATED 386
The UPDATE() Function 386
The COLUMNS_UPDATED() Function 386
Performance Considerations 388
Triggers Are Reactive Rather Than Proactive 388
Triggers Don’t Have Concurrency Issues with the Process That Fires Them 389
Keep It Short and Sweet 389
Don’t Forget Triggers When Choosing Indexes 389
Try Not to Roll Back within Triggers 389
Dropping Triggers 390
Debugging Triggers 390
Summary 392

Chapter 14: Nothing But NET! 393


Assemblies 101 394
Compiling an Assembly 394
Uploading Your Assembly to SQL Server 397
Creating Your Assembly-Based Stored Procedure 398
Creating Scalar User-Defined Functions from Assemblies 400
Creating Table-Valued Functions 403
Creating Aggregate Functions 407
Creating Triggers from Assemblies 412
Custom Data Types 417
Creating Your Data Type from Your Assembly 418
Accessing Your Complex Data Type 418
Dropping Data Types 419
Summary 419

Chapter 15: SQL Cursors 421


What Is a Cursor? 421
The Lifespan of a Cursor 422
Types of Cursors and Extended Declaration Syntax 427
Scope 428
Scrollability 432
Cursor Types 434
Concurrency Options 447
Detecting Conversion of Cursor Types: TYPE_WARNING 450
FOR <SELECT> 452
FOR UPDATE 452
Navigating the Cursor: The FETCH Statement 452

xv
02_584340 ftoc.qxp 10/18/06 2:10 PM Page xvi

Contents
Altering Data within Your Cursor 453
Summary 456

Chapter 16: XML Integration 457


The XML Data Type 458
Defining a Column as Being of XML Type 458
XML Schema Collections 460
Creating, Altering, and Dropping XML Schema Collections 461
XML Data Type Methods 463
Enforcing Constraints beyond the Schema Collection 469
Retrieving Relational Data in XML Format 469
The FOR XML Clause 469
OPENXML 493
A Quick (Very Quick) Reminder of XML Indexes 497
HTTP Endpoints 497
Security 498
HTTP Endpoint Methods 499
Creating and Managing a HTTP Endpoint 499
Closing Thoughts 500
Summary 501

Chapter 17: Reporting for Duty, Sir! 503


Reporting Services 101 504
Building Simple Report Models 504
Data Source Views 507
Report Creation 512
Report Server Projects 517
Deploying the Report 522
Summary 523

Chapter 18: Buying in Bulk: the Bulk Copy Program (BCP)


and Other Basic Bulk Operations 525
BCP Utility 526
BCP Syntax 526
BCP Import 531
BCP Export 534
Format Files 536
When Your Columns Don’t Match 538
Using Format Files 540
Maximizing Import Performance 541

xvi
02_584340 ftoc.qxp 10/18/06 2:10 PM Page xvii

Contents
BULK INSERT 541
OPENROWSET (BULK) 542
ROWS_PER_BATCH 543
SINGLE_BLOB, SINGLE_CLOB, SINGLE_NCLOB 543
Summary 543

Chapter 19: Getting Integrated 545


Understanding the Problem 545
An Overview of Packages 546
Tasks 548
The Main Window 551
Solution Explorer 552
The Properties Window 552
Building a Simple Package 552
Executing Packages 560
Using the Execute Package Utility 560
Executing within Management Studio 562
Summary 563

Chapter 20: Replication 565


Replication Basics 566
Considerations When Planning for Replication 566
Replication Roles 568
Subscriptions 569
Types of Subscribers 570
Filtering Data 570
Replication Models 570
Snapshot Replication 571
Merge Replication 574
Transactional Replication 577
Immediate-Update Subscribers 580
Mixing Replication Types 581
Replication Topology 581
Simple Models 581
Mixed Models 584
Planning for Replication 587
Data Concerns 587
Mobile Devices 588
Setting Up Replication in Management Studio 588
Configuring the Server for Replication 588
Configuring a Publication 592

xvii
02_584340 ftoc.qxp 10/18/06 2:10 PM Page xviii

Contents
Setting Up Subscribers (via Management Studio) 598
Using Our Replicated Database 603
Replication Management Objects (RMO) 605
Summary 606

Chapter 21: Looking at Things in Full: Full-Text Search 607


Full-Text Search Architecture 608
Setting Up Full-Text Indexes and Catalogs 610
Enabling Full-Text for Your Database 610
Creating, Altering, Dropping, and Manipulating a Full-Text Catalog 611
Creating, Altering, Dropping, and Manipulating Full-Text Indexes 614
Creating Full-Text Catalogs Using the Old Syntax 619
Old Syntax for Indexes 621
More on Index Population 622
Full-Text Query Syntax 624
CONTAINS 624
FREETEXT 626
CONTAINSTABLE 626
FREETEXTTABLE 628
Dealing with Phrases 628
Booleans 629
Proximity 629
Weighting 630
Inflectional 631
Noise Words 631
Summary 632

Chapter 22: Security 633


Security Basics 634
One Person, One Login, One Password 634
Password Expiration 635
Password Length and Makeup 637
Number of Tries to Log In 637
Storage of User and Password Information 637
Security Options 638
SQL Server Security 639
Creating and Managing Logins 640
Windows Integrated Security 646

xviii
02_584340 ftoc.qxp 10/18/06 2:10 PM Page xix

Contents
User Rights 647
Granting Access to a Specific Database 647
Granting Object Permissions within the Database 648
User Rights and Statement-Level Permissions 654
Server and Database Roles 655
Server Roles 657
Database Roles 658
Application Roles 661
Creating Application Roles 662
Adding Permissions to the Application Role 662
Using the Application Role 662
Getting Rid of Application Roles 663
More Advanced Security 664
What to Do about the guest Account 664
TCP/IP Port Settings 664
Don’t Use the sa Account 665
Keep xp_cmdshell under Wraps 665
Don’t Forget Views, Stored Procedures, and UDFs as Security Tools 665
Certificates and Asymmetric Keys 666
Certificates 667
Asymmetric Keys 667
Summary 667

Chapter 23: Playing a Good Tune: Performance Tuning 669


When to Tune 670
Index Choices 671
Check the Index Tuning Tool in the Database Tuning Advisor 672
Client- vs. Server-Side Processing 673
Strategic De-Normalization 674
Routine Maintenance 674
Organizing Your Sprocs Well 675
Keeping Transactions Short 675
Using the Least Restrictive Transaction Isolation Level Possible 675
Implementing Multiple Solutions if Necessary 675
Avoiding Cursors if Possible 676
Uses for Temporary Tables 677
Sometimes, It’s the Little Things 677
Hardware Considerations 678
Exclusive Use of the Server 679
I/O vs. CPU Intensive 679
OLTP vs. OLAP 684

xix
Random documents with unrelated
content Scribd suggests to you:
in 1860 one hundred and thirty-nine thousand four hundred and
fifty-six inhabitants, with a corrected enrollment of eighteen
thousand three hundred and seventy-one persons liable to military
service. Of this enrollment, thirteen thousand six hundred and
twenty-eight were farmers, and the remaining four thousand seven
hundred and forty-three comprised persons of other occupations.
Taking this district as an average of the other districts in the state, it
shows the volunteers sent to the front from Ohio were chiefly young
men born in the state—hardy and well-developed Squirrel Hunters.
Of seventeen hundred and fifty-five volunteers forwarded by this
district, from July 4, 1864, to April 30, 1865, one thousand, two
hundred and twenty-nine were Ohio boys, with an average of 23.77
years—the remaining five hundred and twenty-six were from twenty-
four states and fifteen foreign countries, with an average of 27.13
years. Notwithstanding the more favorable age of the latter group
for physical development, the measurements stand decidedly in
favor of the Ohio born, and if adding to the latter the nine hundred
and eighty-seven drafted men, natives of Ohio, the favorable
difference becomes still more apparent.
The Provost-Marshal General, in his report to the War Department,
states there was not a single district in all the loyal states in which
the board of enrollment was free from the annoyance of evil
disposed persons hostile to the Government, who were ever ready
and willing to embarrass its operation by stimulating resistance to
the draft or discouraging enlistments. It was when the disloyal
element experienced the firmness and earnestness of the boards,
and felt the power behind them for the enforcement of the law, that
they became co-laborers and most successful recruiting agents. This
was exceedingly gratifying to the Government, and caused the
Provost-Marshal General to say to the Secretary of War: “I am
confident there is no class of public servants to whom the country is
more indebted for valuable services rendered than the District
Provost-Marshals and their associates, comprising the Boards of
Enrollment, by whose efforts the army of the Union, which
suppressed the Rebellion, was mainly recruited.” Still, Hon. Hoke
Smith, ex-Rebel and Secretary of the Interior, published the
information that these recruiting officers are not pensionable under
the disability act of Congress, June 27, 1890, for the reason “these
officers were not in the war,” and so says the present Commissioner
of Pensions, Hon. Henry Clay Evens. Autocratic decisions are
sometimes quite at variance with sound sense as well as suggestive
of one of ex-President Lincoln’s best stories.
It can not be said that the Ohio Squirrel Hunters were not in the war,
for not a few of them were pensioned long before the ex-secretary
surrendered his arms of rebellion against the Government he now
fosters. The oppressors of slavery in their wicked attempts to
destroy the Union, induced a war that brought with it incalculable
sorrow and suffering—a war that words and figures fail to give an
approximate realization of its magnitude. Dollars can be measured
by millions, but the tears, heart aches and loss of two hundred and
eighty-seven thousand, seven hundred and eighty-nine loyal men
who gave their lives for liberty, and are historically represented by
head-stones that whiten the national cemeteries, can no more be
estimated than can the good that must forever flow to the United
States in wiping out the iniquitous chattel slavery.
Some persons are inclined to look upon the evils following the war—
dissolute legislation, moral turpitude, and political party profligacy, as
neutralizing much if not the entire national benefits acquired at the
enormous cost of the Rebellion. While it is possible, the corruption
following in the wake of protracted wars with large armies may more
than counterbalance the good accomplished by successful military
achievements, it is to be hoped that the subjugation of southern
rebels, giving freedom to millions of slaves, and showing to
credulous monarchs the ability of a republic to coerce obedience to
the constitution and laws, may ever for good outweigh the evils
following the war that accomplished such everlasting benefits. That
the laxity complained of has greatly increased within the last three
decades can scarcely be questioned. Every department of the
government has been more or less criticised for want of faithful
performance. No department has perhaps suffered more in the
confidence of the people than that political plum styled “The
interior.”
The just and honorable cause for pensioning disabled soldiers soon
became merged into politics, and from head to foot the distance was
made short from fact to fraud. Noah’s Ark did not exceed in variety
with all the species of beasts, birds, and creeping things, that of the
contents of the Pension Building with a single species of ex parte
creation. Applications of all kinds, shapes, and forms. This has never
appeared unsatisfactory to that unscrupulous, unmentionable, who
is paid per head by the bureau for the art of filing claims. He knows
by experience the wonderful ability of the institution and its
consulting politicians to overcome objection and get the most
angular cases through the hole that leads to the public treasury.
If stated, it would scarcely be believed that absolute fraud could find
unrequited favor in an office devoted to the most deserving of the
nation—cases as groundless as the following: After enlisting, a
soldier changed his mind, and when called upon to report forwarded
a joint affidavit of himself and physician, in which was stated said
soldier had before and at the date of enlistment permanent
disabilities (naming them), which disqualified him for military
service, and that he should have been rejected. (Soldiers at that
date were sent forward without regulation examination.) Soldier
received a discharge on the affidavit and was happy.
In due time an application was made under the arrears act, giving
the diseases named in the joint affidavit as having “occurred in the
service in line of duty.” In days of honest administration, in looking
up the history of the applicant in the War Office, the affidavit was
found and placed with the file in the Pension Office.
This ended the case, and under several administrations it slept with
attempts at fraud. Perseverance is said to be the road to success,
and by the stimulant of contingent fees intercession was secured,
and by management of good legal advice the case was placed in the
hands of a “special examiner,” and went through without the loss of
a dollar, securing a small fortune in arrears, but claiming the rating
too low, and making immediate application for increase.
It would seem improbable for the heads of the bureau not to know
and fully understand some of the many instances of perjury and
fraud that passed current through the office. It is the old rejected or
suspended cases with large arrears that are attractive and are
thoroughly investigated for new evidence. In this attempt parties
generally receive the courteous assistance of those officially
connected with the office. Even a medical referee has been known
to show great interest in barefaced fraud, and give tips to aid in
getting such through the bureau successfully. General Phil Sheridan,
who was well informed in regard to the contents of the great
Pension Office, was told the contents were safe, as the building was
fire-proof, and could never burn down, replied: “That would be my
serious objection to it.”
Notwithstanding reports of corruption, fraud, avarice, and greed for
public plunder, which may slow the advancing pace of civilization,
there are enough common people to preserve the nation—people
who worship not at the feet of the God of Aaron; poor people;
people who pay legal tribute to the government; honest, stalwart
standard-bearers of morality, intelligence, and patriotism; supporters
of common-schools and churches; people who are ever watchful of
the interests of the nation, protect the sanctity of the ballot-box, and
direct the legal machinery for the protection of virtue and
suppression of vice, possessing salt with the savor of moral honesty
that passes current in business and social life.
The expressed will of the people is the law of the land. It has made
and amended constitutions; by it black has become white; the bond
free; slaves, citizens. It has erected monuments; built towns and
cities; and in war and times of peace has accomplished much for the
good of all. It has muzzled many of the national vices, and given
civilization long strides in the right direction. And the spirit of the age
should by law hasten the end of growing political struggles for place
regardless of qualification.
It has become a matter of common report, and one that is generally
believed, that successful applicants for office by the suffrage of the
people are but seldom as much interested in the welfare of their
constituents as they are in their own sycophantic obedience to
selfish bosses, who, under party cover, willingly contribute of their
wealth to perpetuate a party power that assures the gratification of
their own greed for ill-gotten gain.
Qualification is recognized as essential by law, and lies at the
foundation of civil and military service. State laws require that
teachers of common schools furnish legal evidence of qualification
for the position. The commander of an army must have a military
education and qualification; so, too, every appointment made
through the civil departments of the government, for a short
distance up the base, requires of the applicant a certificate from a
qualified board of censors, stating that said applicant is in all
respects fitted to perform the duties of the position applied for. This
is termed Civil and Military Service, and has been declared
constitutional.
If so, why may not the people demand more? If a little civil service
meted out to those filling subordinate positions is a benefit, why
may not the like treatment be accorded to all candidates seeking
national positions, by appointment or directly from the people? It is
admitted that civil service is a matter of safety and efficiency in
subordinate civil positions. If so, it is not unreasonable to suppose
the salutary effects would be infinitely greater if applied to the more
responsible positions. Education and qualification for all positions is
the law of military government; and most certainly similar
requirements might be made equally advantageous to the civil
government. Military government could not long sustain existence
without the service of prescribed regulations. The commanding
general of the army obtains the high honor of the position from his
education and certified ability, and efficiency as master of the
science of war. The President of the United States, being over all as
commander-in-chief, should be thoroughly versed in the civil and
military, as Master of the Science of Government, not only of our
own, but that of every nation on earth.
There does not appear to be any sufficient reason why a
government civil service should not exist and be as open to the
election of coming generations as that of law, medicine, literary or
other pursuits; and it is not saying a word too much to urge the
necessity for an institution adapted to the civil as West Point is to
the military power, where persons having taken the degree of A.M.
may matriculate and qualify themselves for the civil service, and
obtain a certificate of such qualification from the institution, having a
prescribed curriculum, requiring four years of study to entitle one to
examination for the honors of graduation.
Individuals highly educated in the science of government and the art
of governing, fitted for a field exclusively their own, would promote
an agreement upon the complex questions that now agitate and
endanger the peace of society by keeping at fever heat party
differences that are magnified by designing politicians.
The high authority of the teachings of the court of instructions,
would define the policy and give stability to the Government, and
would remove party press for office by incompetency. It would also
determine the exact relations between the several departments of
the Government, especially how far the President has power to
involve the country in war against the will of Congress by
recognizing belligerency or independence in cases in which Congress
refused such recognition.
As the nation increases in population and number of states, it
requires increased wisdom and knowledge to rule and make the
people prosperous and happy. The great central region lying
between the Ohio river, Lakes and Mississippi will ever be the heart
of the Republic. Within it are the life springs of three-fourths of our
country’s whole area. Nowhere in the United States is there a basin
of such vast extent, capable of feeding so great a population.
“Hence its destiny is to hold the balance of power between East and
West, hence it is truly regal.”[33]
When the first-born of the states of this great basin came into the
Union (Ohio), it brought with its baptism the inauguration of
National Internal Improvements—a policy that has enriched the
nation by liberality of expenditures, improving harbors, water-ways
and roads, in building custom-houses, post-offices, and in assisting
the states in many laudable undertakings, while like the miser, in all
its vast wealth has been wearing old, unbecoming, unfashionable
clothes and doing the business of the nation in rented and other ill-
begotten shops, located here and there, as best suited real-estate
sharks and speculators in a sickly city.[34] But the dawn of day is
coming by which the people of the North-west now see it is high
time the Government should make for itself a permanent home—a
place of security for all the valuable records of the nation. A spot for
the Government alone, called “The Capitol of the United States,”
near the center of population controlling representation, free from
private property. A capital with capacious senatorial, representative
and judicial halls, contiguous to the several departments, with state
dwellings for senators and representatives of the several states, and
other necessary buildings, all to be owned and controlled by the
Government, each constructed with reference to the intended uses,
large enough to accommodate an ordinary peaceable assemblage of
American citizens, with room to spare.
The most celebrated speaker now living in America, on reciting a
visit to the present capital during the sitting of Congress, states:
“Another thing that impressed me was, that the hall of the House of
Representatives was built in defiance of all laws of acoustics. There
are more echoes than can be counted to play havoc with a speech,
and turn the finest oratory into a senseless gabble.” A capital
situated on the border of an inland sea, with large grounds, parks,
lakes, lagoons, gardens, and fountains, in beauty all that art and
nature is able to make one place on this continent fitly dedicated to
the keeping of the charter of the best government on earth. And,
then, if the crowned heads of the world have a desire to see the
majesty of a Republic, owned and preserved by the people, let them
come and look upon “The Capital of the United States”—where just
laws are made and interpreted alike for all the people.
A capital with the architectural requirements of so great a nation,
bristling with “peacemakers” and a floating navy in sight, would
increase American pride and attachment, and do more to advance
the arts, sciences, and sound civilization than all other national
improvements combined. It would “copy the Monroe Doctrine into
international law,” and secure peace over the entire world.
The Squirrel Hunters
of
Ohio and North-west will do it.
Good Night.
FOOTNOTES:
[1] Native fruit: cranberries, huckleberries, blackberries,
raspberries, service berries, paw-paws (custard apples),
persimmons, plums, grapes, cherries, haws, crab apples.
[2] Mr. Havemeyer is the autocrat of the Sugar Trust of America
after the fashion of Mr. Arbuckle, the Coffee Baron. Under the
chairmanship of a committee the New York legislature, Senator
Luxow investigated the Sugar Trust and found Mr. Havemeyer
controlled four-fifths of the entire output of sugar in America.
[3] Mills erected on two boats, separated at an angle, with water
wheel near the bow. The natural current of the stream passing
between the boats turned the wheel that moved the machinery of
the mill, which would grind twenty to forty bushels of corn in
twenty-four hours, according to the current of the stream.
[4] Prof. Drummond.
[5] Buffon.
[6] History United States, by C. A. Goodrich, 1823: “This fund, in
May 1821, amounted to one million seven hundred thousand
dollars—the yearly income of which, together with twelve
thousand dollars of the public taxes, is annually devoted to the
maintenance of common school masters in every town in the
state. The amount paid to the towns from this fund, in 1818, was
more than seventy thousand dollars—a greater sum by twenty-
two thousand dollars than the whole state tax amounted to in the
year preceding.”
[7] Mathews.
[8] “The Builders of the Nation.”
[9] Dr. R. Dunglison.
[10] Charles Whittlesey.
[11] Charles Whittlesey.
[12] “Ohio Valley,” by Samuel Williams, p. 40.
[13] “Autobiography of a Pioneer,” by Rev. Jacob Young.
[14] Atwater, “History of Ohio.”
[15] Note—1895.—“Out of eight new Republican United States
Senators just sworn in, four were born in Ohio. There are now
eleven Ohio-born Senators. Ohio does a good business in ‘raising
men,’ to say nothing about the good women.”—Chicago Inter-
Ocean.
“True. It might be added that the managing editor and chief
political writer of the Inter-Ocean are Ohio men. And, according
to Mr. Dana and Mr. McCullagh, to be an editor is ‘greater than a
king.’”—Exchange.
[16] Howe’s Hist. Coll.
[17] Minnesota, with an area of 46,000,000 acres, gave
20,000,000 acres to 3,200 miles of railroads.
[18] Barr’s Buffon, Vol. VII, page 175.
[19] Stevens’s Report.
[20] Illustrations of the Nests and Eggs of Birds of Ohio.
[21] Hon. J. M. Rusk, Secretary Agriculture Report, 1889.
[22] Minneapolis Journal.
[23] Sixteen articles of amendment to the adopted Constitution
were approved by Congress, September, 1789, ten of which were
approved by the states.
[24] Excise act in Pennsylvania in 1794. This revolt required
fifteen thousand armed men to quell, and cost the United States
$1,000,000.
[25] Editor “Olive Branch” (No. 2).
[26] Whip.
[27] Recollections of Samuel Brock, pp. 275-7.
[28] Wood’s book on Railroads, 1825.
[29] Sherman and His Campaigns.
[30] W. T. Sherman.
[31] “Ohio in the War.” Reed.
[32] Ten miles in length.
[33] “The Making of the Ohio Valley States.”
[34] The death rate per 1000 of the inhabitants of the present
capital is nearly double ordinary mortuary statistics of other cities.
A single fatal disease—consumption—shows a death ratio per
1000, seven times greater than any city west of the Alleghany
Mountains.—Hess.
Transcriber’s Notes:
Footnotes have been moved to the end of the text and relabeled consecutively through
the document.
Illustrations have been moved to paragraph breaks near where they are mentioned.
Punctuation has been made consistent.
Variations in spelling and hyphenation were retained as they appear in the original
publication, except that obvious typographical errors have been corrected.
Captions were added to illustrations for text in the illustration as follows:
p. 95: THE OLIVE BRANCH
p. 109: SEAL
p. 110: SEAL
p. 111: SEAL
p. 256: LORD DUNMORE’S CAMPAIGN.
The following changes were made:
p. 40: ” inserted (had existed.” Without)
p. 47: Scoth changed to Scotch (sable Scotch Collie)
p. 219: Lo changed to Love (nature. Love had)
p. 333: deciminated changed to disseminated (and disseminated by)
*** END OF THE PROJECT GUTENBERG EBOOK THE SQUIRREL
HUNTERS OF OHIO; OR, GLIMPSES OF PIONEER LIFE ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States
copyright in these works, so the Foundation (and you!) can copy
and distribute it in the United States without permission and
without paying copyright royalties. Special rules, set forth in the
General Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and
with almost no restrictions whatsoever. You may copy it,
give it away or re-use it under the terms of the Project
Gutenberg License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country
where you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of
the copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookultra.com

You might also like