You are on page 1of 41

Oracle 12c SQL 3rd Edition (eBook

PDF)
Visit to download the full and correct content document:
https://ebooksecure.com/download/oracle-12c-sql-3rd-edition-ebook-pdf/
TABLE OF CONTENTS

Preface xiv
Chapter 1 Overview of Database Concepts 1
Introduction 2
Database Terminology 2
Database Management System 3
Database Design 4
Entity-Relationship (E-R) Model 5
Database Normalization 6
Relating Tables in the Database 10
Structured Query Language (SQL) 12
Databases Used in This Textbook 13
Basic Assumptions 13
Tables in the JustLee Books Database 14
Topic Sequence 16
Software Used in This Textbook 16
Chapter Summary 17
Review Questions 17
Multiple Choice 18
Hands-On Assignments 21
Advanced Challenge 22
Case Study: City Jail 22

Chapter 2 Basic SQL SELECT Statements 25


Introduction 26
Creating the JustLee Books Database 27
SELECT Statement Syntax 30
Selecting All Data in a Table 31
Selecting One Column from a Table 33
Selecting Multiple Columns from a Table 34
Operations in the SELECT Statement 36
Using Column Aliases 36
Using Arithmetic Operations 39
NULL Values 40
Using DISTINCT and UNIQUE 42
Using Concatenation 44
Chapter Summary 49
Chapter 2 Syntax Summary 49

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Review Questions 50
Multiple Choice 51
Hands-On Assignments 54
Advanced Challenge 55
Case Study: City Jail 55

Chapter 3 Table Creation and Management 57


Introduction 58
Table Design 59
Table Creation 63
Defining Columns 63
Viewing a List of Tables: USER_TABLES 65
Viewing Table Structures: DESCRIBE 66
Table Creation with Subqueries 70
CREATE TABLE … AS Command 70
Modifying Existing Tables 72
ALTER TABLE … ADD Command 73
ALTER TABLE … MODIFY Command 74
ALTER TABLE … DROP COLUMN Command 79
ALTER TABLE … SET UNUSED/DROP UNUSED COLUMNS Command 80
Renaming a Table 83
Truncating a Table 85
Deleting a Table 86
Chapter Summary 91
Chapter 3 Syntax Summary 92
Review Questions 93
Multiple Choice 94
Hands-On Assignments 97
Advanced Challenge 97
Case Study: City Jail 98

Chapter 4 Constraints 103


Introduction 104
Creating Constraints 105
Creating Constraints at the Column Level 106
Creating Constraints at the Table Level 106
Using the PRIMARY KEY Constraint 107
Using the FOREIGN KEY Constraint 110
Using the UNIQUE Constraint 115
Using the CHECK Constraint 116
Using the NOT NULL Constraint 119
Including Constraints During Table Creation 121
Adding Multiple Constraints on a Single Column 125
Viewing Constraint Information 126

vi Table of Contents

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Disabling and Dropping Constraints 128
Using DISABLE/ENABLE 128
Dropping Constraints 129
Chapter Summary 131
Chapter 4 Syntax Summary 131
Review Questions 133
Multiple Choice 134
Hands-On Assignments 137
Advanced Challenge 139
Case Study: City Jail 139

Chapter 5 Data Manipulation and Transaction Control 141


Introduction 142
Inserting New Rows 143
Using the INSERT Command 143
Handling Virtual Columns 150
Handling Single Quotes in an INSERT Value 152
Inserting Data from an Existing Table 154
Modifying Existing Rows 156
Using the UPDATE Command 156
Using Substitution Variables 158
Deleting Rows 162
Using Transaction Control Statements 163
COMMIT and ROLLBACK Commands 164
SAVEPOINT Command 165
Using Table Locks 168
LOCK TABLE Command 168
SELECT … FOR UPDATE Command 169
Chapter Summary 171
Chapter 5 Syntax Summary 172
Review Questions 173
Multiple Choice 173
Hands-On Assignments 176
Advanced Challenge 177
Case Study: City Jail 178

Chapter 6 Additional Database Objects 181


Introduction 182
Sequences 183
Creating a Sequence 184
Using Sequence Values 189
Setting and Altering Sequence Definitions 192
Altering Sequence Definitions 194
Removing a Sequence 196
Use Identity Columns Instead of Sequences for Primary Key Columns 197

Table of Contents vii

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Indexes 199
B-Tree Indexes 200
Bitmap Indexes 206
Function-Based Indexes 208
Index Organized Tables 209
Verifying an Index 210
Altering or Removing an Index 211
Synonyms 212
Deleting a Synonym 215
Chapter Summary 216
Chapter 6 Syntax Summary 217
Review Questions 218
Multiple Choice 219
Hands-On Assignments 222
Advanced Challenge 223
Case Study: City Jail 224

Chapter 7 User Creation and Management 225


Introduction 226
Data Security 227
Creating a User 228
Creating Usernames and Passwords 228
Assigning User Privileges 230
System Privileges 230
Granting System Privileges 231
Object Privileges 232
Granting Object Privileges 232
Managing Passwords 236
Using Roles 237
Creating and Assigning Roles 238
Using Predefined Roles 240
Using Default Roles 241
Enabling Roles After Login 242
Viewing Privilege Information 242
Removing Privileges and Users 244
Revoking Privileges and Roles 244
Dropping a Role 246
Dropping a User 246
Chapter Summary 247
Chapter 7 Syntax Summary 247
Review Questions 249
Multiple Choice 249
Hands-On Assignments 253
Advanced Challenge 253
Case Study: City Jail 254

viii Table of Contents

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Chapter 8 Restricting Rows and Sorting Data 255
Introduction 256
Where Clause Syntax 257
Rules for Character Strings 258
Rules for Dates 260
Comparison Operators 260
BETWEEN ... AND Operator 267
IN Operator 268
LIKE Operator 270
Logical Operators 274
Treatment of Null Values 277
ORDER by Clause Syntax 279
Secondary Sort 282
Sorting by SELECT Order 284
Chapter Summary 285
Chapter 8 Syntax Summary 286
Review Questions 288
Multiple Choice 288
Hands-On Assignments 292
Advanced Challenge 293
Case Study: City Jail 293

Chapter 9 Joining Data from Multiple Tables 295


Introduction 296
Cartesian Joins 297
Cartesian Join: Traditional Method 298
Cartesian Join: JOIN Method 300
Equality Joins 301
Equality Joins: Traditional Method 303
Equality Joins: JOIN Method 308
Non-Equality Joins 314
Non-Equality Joins: Traditional Method 315
Non-Equality Joins: JOIN Method 316
Self-Joins 317
Self-Joins: Traditional Method 318
Self-Joins: JOIN Method 319
Outer Joins 320
Outer Joins: Traditional Method 321
Outer Joins: JOIN Method 324
Set Operators 326
Chapter Summary 334
Chapter 9 Syntax Summary 335
Review Questions 337
Multiple Choice 338
Hands-On Assignments 344

Table of Contents ix

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Advanced Challenge 345
Case Study: City Jail 345

Chapter 10 Selected Single-Row Functions 347


Introduction 348
Case Conversion Functions 349
The LOWER Function 349
The UPPER Function 350
The INITCAP Function 351
Character Manipulation Functions 352
The SUBSTR Function 352
The INSTR Function 354
The LENGTH Function 356
The LPAD and RPAD Functions 357
The LTRIM and RTRIM Functions 358
The REPLACE Function 359
The TRANSLATE Function 360
The CONCAT Function 360
Number Functions 361
The ROUND Function 361
The TRUNC Function 362
The MOD Function 363
The ABS Function 364
The POWER Function 365
Date Functions 365
The MONTHS_BETWEEN Function 367
The ADD_MONTHS Function 367
The NEXT_DAY and LAST_DAY Functions 368
The TO_DATE Function 369
Rounding Date Values 371
Truncating Date Values 372
CURRENT_DATE Versus SYSDATE 373
Regular Expressions 374
Other Functions 377
The NVL Function 377
The NVL2 Function 380
The NULLIF Function 381
The TO_CHAR Function 383
The DECODE Function 385
The CASE Expression 387
The SOUNDEX Function 387
The TO_NUMBER Function 388
The DUAL Table 389
Chapter Summary 390
Chapter 10 Syntax Summary 390
Review Questions 394

x Table of Contents

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Multiple Choice 395
Hands-On Assignments 399
Advanced Challenge 399
Case Study: City Jail 400

Chapter 11 Group Functions 401


Introduction 402
Group Functions 403
The SUM Function 404
The AVG Function 406
The COUNT Function 408
The MAX Function 411
The MIN Function 412
Grouping Data 413
Restricting Aggregated Output 417
Nesting Functions 421
Statistical Group Functions 422
The STDDEV Function 422
The VARIANCE Function 423
Enhanced Aggregation for Reporting 424
The GROUPING SETS Expression 427
The CUBE Extension 428
The ROLLUP Extension 431
Pattern Matching 437
Chapter Summary 439
Chapter 11 Syntax Summary 439
Review Questions 441
Multiple Choice 442
Hands-On Assignments 446
Advanced Challenge 447
Case Study: City Jail 447

Chapter 12 Subqueries and MERGE Statements 449


Introduction 450
Subqueries and Their Uses 451
Single-Row Subqueries 451
Single-Row Subquery in a WHERE Clause 451
Single-Row Subquery in a HAVING Clause 456
Single-Row Subquery in a SELECT Clause 457
Multiple-Row Subqueries 459
The IN Operator 460
The ALL and ANY Operators 461
Multiple-Row Subquery in a HAVING Clause 465
Multiple-Column Subqueries 467
Multiple-Column Subquery in a FROM Clause 467
Multiple-Column Subquery in a WHERE Clause 469

Table of Contents xi

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
NULL Values 471
NVL in Subqueries 471
IS NULL in Subqueries 472
Correlated Subqueries 473
Nested Subqueries 475
Subquery Factoring Clause 477
DML Actions Using Subqueries 478
MERGE Statements 479
Chapter Summary 484
Chapter 12 Syntax Summary 484
Review Questions 486
Multiple Choice 486
Hands-On Assignments 492
Advanced Challenge 493
Case Study: City Jail 493

Chapter 13 Views 495


Introduction 496
Creating a View 498
Creating a Simple View 500
DML Operations on a Simple View 504
Creating a Complex View 508
DML Operations on a Complex View with an Arithmetic Expression 508
DML Operations on a Complex View Containing Data from Multiple Tables 513
DML Operations on a Complex View Containing Functions or Grouped Data 515
DML Operations on a Complex View Containing DISTINCT or ROWNUM 517
Summary Guidelines for DML Operations on a Complex View 519
Dropping a View 519
Creating an Inline View 520
CROSS and OUTER APPLY Methods for Joins 520
TOP-N Analysis 522
Creating a Materialized View 527
Chapter Summary 531
Chapter 13 Syntax Summary 532
Review Questions 533
Multiple Choice 533
Hands-On Assignments 537
Advanced Challenge 538
Case Study: City Jail 538

Appendix A Tables for the JustLee Books Database 539


CUSTOMERS Table 539
BOOKS Table 540
ORDERS Table 541
ORDERITEMS Table 542
AUTHOR Table 543
BOOKAUTHOR Table 544

xii Table of Contents

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
PUBLISHER Table 545
PROMOTION Table 546

Appendix B SQL*Plus and SQL Developer Overview 547


Introduction 547
SQL*Plus 547
SQL Developer 551

Appendix C Oracle Resources 555


Oracle Academic Initiative (OAI) 555
Oracle Certification Program (OCP) 555
Oracle Technology Network (OTN) 555
International Oracle Users Group (IOUG) 556

Appendix D SQL*Loader 557


Introduction 557
Read a Fixed File Format 557
Read a Delimited File 559

Appendix E SQL Tuning Topics 561


Introduction 561
Tuning Concepts and Issues 561
Identifying Problem Areas in Coding 561
Processing and the Optimizer 563
The Explain Plan 565
Timing Feature 570
Selected SQL Tuning Guidelines and Examples 571
Avoiding Unnecessary Column Selection 572
Index Suppression 573
Concatenated Indexes 575
Subqueries 576
Optimizer Hints 577

Appendix F SQL in Various Databases 579


Introduction 579
Suppressing Duplicates 579
Locating a Value in a String 580
Displaying the Current Date 580
Specifying a Default Date Format 580
Replacing NULL Values in Text Data 581
Adding Time to Dates 581
Extracting Values from a String 581
Concatenating 582
Data Structures 582

Glossary 583
Index 589

Table of Contents xiii

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
PREFACE

The past few decades have seen a proliferation of organizations that rely heavily on
information technology. These organizations store their data in databases, and many
choose Oracle database management systems to access their data. The current Oracle
database version, Oracle 12c, is a database management system that enables users to
create, manipulate, and retrieve data. The purpose of this textbook is to introduce
students to basic SQL commands for interacting with Oracle 12c databases in a business
environment. In addition, concepts relating to objectives of the current Oracle
certification exams have been incorporated for students wanting to pursue certification.

The Intended Audience


This textbook has been designed for students in technical two-year or four-year programs
who need to learn how to interact with databases. Although having an understanding of
database design is preferable, an introductory chapter has been included to review the
basic concepts of E-R modeling and the normalization process.

Oracle Certification Program (OCP)


This textbook covers the objectives of SQL Fundamentals Exams available: 1Z0-051 for
Oracle 11g and Exam 1Z0-061 for Oracle Database 12c. Most objectives for Exam 1Z0-
047, Oracle Database SQL Expert, are also covered. Any of these exams serve as the first
exam in the Oracle Application Development and Oracle Database Administrator Oracle
Certified Associate level certification tracks. Information about registering for these
exams, along with other reference material, is available at www.oracle.com.

The Approach
The concepts introduced in this textbook are discussed in the context of a hypothetical
real-world business: an online book retailer named JustLee Books. The company’s
business operation and the database structure are introduced and analyzed, and as
commands are introduced throughout the textbook, they’re modeled with examples using
the JustLee Books database. Using consistent examples of a hypothetical company helps
you learn the syntax of commands and how to use them in a real-world environment. In
addition, a script file that generates the database is available to give you hands-on practice
in re-creating examples and practicing variations of SQL commands to enhance your
understanding.
To explain what a database is and how it’s created, this textbook initially focuses
on creating tables and learning how to perform data manipulation operations. After
you’re familiar with the database structure, the focus then turns to querying a database.

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
In Chapters 8 through 13, you learn how to retrieve data from the database, using the
many options of a SELECT statement, including row filtering, joins, functions, and
subqueries.
To reinforce the material, each chapter includes a chapter summary and, when
appropriate, a syntax guide for the commands covered in the chapter. In addition, each
chapter includes review questions and hands-on activities that test your knowledge and
challenge you to apply that knowledge to solving business problems. A running case study
that builds throughout the textbook provides a second real-world setting—a city jail
system—as another opportunity to work with databases.

New to This Edition


Topics added covering new Oracle 12c features include:
• Extended data types
• Invisible columns
• Default column values
• Specifying a value for NULL inserts
• Based on a sequence value
• Identity columns
• Left outer join enhancements
• CROSS APPLY join method
• Pattern matching for trend analyses
• Enhanced Top-N-Query features
In addition, coverage of subquery factoring or use of the WITH clause has been added
to Chapter 12.

Overview of This Book


The examples, assignments, and cases in this book help you achieve the following
objectives:
• Issue SQL commands that retrieve data based on criteria specified by
the user.
• Use SQL commands to join tables and retrieve data from joined tables.
• Perform calculations based on data stored in the database.
• Use functions to manipulate and aggregate data.
• Use subqueries to retrieve data based on unknown conditions.
• Create, modify, and drop database tables.
• Manipulate data stored in database tables.
• Enforce business rules by using table constraints.
• Create users and assign the privileges users need to perform tasks.
The chapters’ contents build in complexity while reinforcing previous ideas. Chapter 1
introduces basic database management concepts, including database design. Chapter 2
shows how to retrieve data from a table. Chapter 3 explains how to create new database
tables. Chapter 4 addresses the use of constraints to enforce business rules and ensure the
integrity of table data. Chapter 5 explains adding data to a table, modifying existing data,
and deleting data. Chapter 6 shows how to use a sequence to generate numbers, create

Preface xv

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
indexes to speed up data retrieval, and create synonyms to provide aliases for tables.
Chapter 7 steps you through creating user accounts and roles and shows how to grant (and
revoke) privileges to these accounts and roles. Chapter 8 explains how to restrict rows
retrieved from a table, based on a given condition. Chapter 9 shows how to link tables with
common columns by using joins. Chapter 10 describes the single-row functions supported
by Oracle 12c. Chapter 11 covers the usage of multiple-row functions to derive a single
value for a group of rows and explains how to restrict groups of rows. Chapter 12 covers
using subqueries to retrieve rows based on an unknown condition already stored in the
database. Chapter 13 explains using views to restrict access to data and reduce the
complexity of certain types of queries.
The appendixes support and reinforce chapter materials. Appendix A contains
printed versions of the initial table structure and data for the JustLee Books database used
throughout this textbook. Appendix B introduces the operation of the SQL*Plus and SQL
Developer client software tools. Appendix C lists Oracle resources for further study.
Appendix D introduces the SQL*Loader utility for importing data. Appendix E introduces
basic SQL statement tuning concepts. Appendix F identifies SQL differences in some
popular databases.

Features
To enhance your learning experience, each chapter in this textbook includes the following
elements:
• Chapter objectives: Each chapter begins with a list of the concepts to be
mastered by the chapter’s conclusion. This list gives you a quick overview of
chapter contents and serves as a useful study aid.
• Running case: A sustained example, the business operation of JustLee Books,
is the basis for introducing new commands and practicing the material
covered in each chapter.
• Methodology: As new commands are introduced in each chapter, the
command syntax is shown and then an example, using the JustLee Books
database, illustrates using the command in the context of business
operations. This methodology shows you not only how the command is used,
but also when and why it’s used. The script file used to create the database is
available so that you can work through the examples in this textbook,
engendering a hands-on environment in which you can reinforce your
knowledge of chapter material.
• Tip: This feature, designated by the Tip icon, provides practical advice and
sometimes explains how a concept applies in the workplace.
• Note: These explanations, designated by the Note icon, offer more
information on performing operations with databases.
• Database Preparation: These notes, placed at the end-of-chapter
introductions, tell you which script from the student data files you should
run in preparation for chapter examples and activities.
• Caution: This warning, designated by the Caution icon, points out database
operations that, if misused, could have devastating results.
• Chapter summaries: Each chapter’s text is followed by a summary of chapter
concepts. These summaries are a helpful recap of chapter contents.

xvi Preface

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
• Syntax summaries: Beginning with Chapter 2, a Syntax Guide table is
included after each chapter summary to recap the command syntax covered
in the chapter.
• Review questions: End-of-chapter assessment begins with review questions
that reinforce the main ideas introduced in each chapter. These questions
ensure that you have mastered the concepts and understand the information
covered in the chapter.
• Multiple-choice questions: Each chapter contains multiple-choice
questions covering the material in the chapter. Oracle certification-type
questions are included to prepare you for the type of questions you
can expect on certification exams and measure your level of
understanding.
• Hands-on assignments: Along with conceptual explanations and
examples, each chapter includes hands-on assignments related to the
chapter’s contents. The purpose of these assignments is to give you
practical experience. In most cases, the assignments are based on the
JustLee Books database and build on the examples in the chapter.
• Advanced challenge: This section poses another problem about the JustLee
Books database for you to solve and is larger in scope than the hands-on
assignments.
• Case studies: At the end of each chapter is a major case study, designed
to help you apply what you have learned to real-world situations. These
cases give you the opportunity to synthesize and evaluate information
independently, examine potential solutions, and make recommendations,
much as you would in an actual business situation. These cases uses a
database based on a city jail system.

Supplemental Materials
The following supplemental materials are available when this book is used in a classroom
setting. All teaching tools available with this book are provided to instructors on the
Cengage Learning Web site at www.cengagebrain.com.
• Electronic Instructor’s Manual: The Instructor’s Manual accompanying this
textbook includes the following items:
• Additional instructional material to assist in class preparation, including
suggestions for lecture topics
• A sample syllabus
• When applicable, information about potential problems that can occur in
networked environments
• Cengage Learning Testing Powered by Cognero is a flexible, online system
that allows you to:
• author, edit, and manage test bank content from multiple Cengage
Learning solutions
• create multiple test versions in an instant
• deliver tests from your LMS, your classroom or wherever you want

Preface xvii

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
• PowerPoint presentations: Microsoft® PowerPoint slides are included for
each chapter. Instructors can use the slides in three ways: as teaching
aids during classroom presentations, as printed handouts for classroom
distribution, or as network-accessible resources for chapter review.
Instructors can add their own slides for additional topics introduced to
the class.
• Data files: The script files needed to create the JustLee Books and City
Jail databases are available on the Cengage Learning Web site at www
.cengagebrain.com.
• Solution files: Solutions to chapter examples, end-of-chapter review
questions and multiple-choice questions, hands-on assignments, and case
studies are available on the Cengage Learning Web site at www
.cengagebrain.com. The solutions are password protected.
• Figure files: Figure files allow instructors to create their own presentations
with figures from the textbook.

Acknowledgments
I feel fortunate that Cengage Learning pursued my authorship of this textbook and
continues to support my efforts. I am one lucky person—I have two angels in heaven, my
mother and grandmother, and one angel here on earth, Scott. Without them watching
over me, I would not be able to tackle such challenges. I also want to thank my father,
who always seems more excited than me every time I finish a book project.
However, this textbook is the result of an incredible effort by many people whom
I wish I had the opportunity to thank personally. First, hats off to Lori Bradshaw and
Wendy Langerud of S4Carlisle Publishing Services for managing the content for this
project and keeping everyone on schedule. And a special thank you to Arul Joseph Raj
of Lumina Datamatics LTD for his detailed efforts in preparing, reviewing, and formatting
the content. There were many others involved in this project like product management,
editing, marketing, and art development, and every effort was critical in making this
book a reality. I truly appreciate all of these efforts.
In addition, I need to recognize the enormous contribution of colleagues and
reviewers, who provided helpful suggestions and insight into the development of this
textbook in earlier editions. And, finally, many thanks to the instructors who have
adopted this text and have dedicated their efforts to assist others to learn these most
important database skills.

xviii Preface

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
READ THIS BEFORE YOU BEGIN

TO THE USER

Data Files
To work through the examples and complete the projects in this book, you need to load
the data files created for this book. Your instructor will provide these data files, or you
can download them from the Cengage Learning Web site at www.cengagebrain.com and
then search for this book’s title. The data files are designed to supply the same data shown
in chapter examples, so you can have hands-on practice in re-creating the queries and
their output. The tables in the database can be reset if you encounter problems, such as
accidentally deleting data. Working through all examples is highly recommended to
reinforce your learning.
Starting with Chapter 2, database script instructions are given at the beginning of the
chapter, if applicable. These database script files are in the folder corresponding to the
chapter (Chapter 5, Chapter 10, and so forth) on www.cengagebrain.com and have
filenames such as JLDB_Build_#.sql (substituting the chapter number for the
# symbol). If the computer in your school lab—or your own computer—has Oracle 12c
installed, you can work through the chapter examples and complete the hands-on
assignments and case projects. Many of the coding examples in this textbook can be
completed successfully with previous versions of Oracle (Oracle 10g or Oracle 11g).

Connecting to Oracle
Most colleges will provide various options for accessing Oracle software to execute SQL
statements required in this text, typically via the internet and/or using college computer
labs. Contact your instructor first to identify the options available. If you choose to install
Oracle 12c on your own computer, visit www.oracle.com and go to the database
download area. The database software is freely available for learning purposes, however, it
is very important that you view the documentation for the software prior to downloading
and installing the software. Be sure to review the hardware and software requirements
prior to attempting the install. You will be asked to setup a free Oracle Technology
Network account before downloading. If you are new to Oracle, consult with your
instructor prior to installing Oracle database software for guidance. This text was tested
on Oracle Database 12c release 12.1.0.1.0.
When you install the Oracle software, you’re prompted to change the password for
certain default administrative user accounts. Make sure you record the accounts’ names
and passwords because you might need to log in to the database with one of these
administrative accounts in later chapters. After you install Oracle, you’re required to

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
enter a username and password to access the software. One default username created
during installation is “scott.”
Also, note that you can’t use your own computer to work through chapter examples
and complete projects unless you have the data files. You can get these files from your
instructor, or you can download them from the Cengage Learning Web site at www
.cengagebrain.com and then search for this book’s title. When you download the data
files, they should be stored in a directory separate from any other files on your hard drive.
You need to remember the path or folder containing these files because each script
filename must be prefixed with its location before you run the script.

Visit Our Web Site


A supplemental chapter on formatting report output has been included in the book’s
online materials. Additional materials designed especially for this textbook might be
available on the Cengage Learning Web site. Go to www.cengagebrain.com periodically
and search this site for more details.

TO INSTRUCTORS
To complete examples and activities in this textbook, your students must have access to
the data files included on the Instructor Resources GD (or downloaded from www
.cengagebrain.com).
The data files consist of the JustLee Database folder and a folder for each chapter.
Many chapters require running a script; if so, these instructions are given in a note at the
beginning of the chapter. These scripts are in folders corresponding to the chapter
(Chapter 5, Chapter 10, and so forth) and have filenames such as JLDB_Build_#.sql
(substituting the chapter number for the # symbol). The initial database creation is done
at the beginning of Chapter 2 to create the JustLee Books database. Students should run
the scripts as instructed to have a copy of the tables stored in their schemas. You should
instruct your students on how to access and copy data files to their own computers. The
chapters and projects in this book were tested with Oracle 12c Standard Edition.

Cengage Learning Data Files


You are granted a license to copy data files to any computer or computer network used by
people who have purchased this book.

xx Read This Before You Begin

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
CHAPTER 1
OVERVIEW OF DATABASE
CONCEPTS

LEARNING OBJECTIVES
After completing this chapter, you will be able to do the following:
• Define database terms
• Identify the purpose of a database management system (DBMS)
• Explain database design by using entity-relationship models and
normalization
• Explain the purpose of a Structured Query Language (SQL)
• Understand how this textbook’s topics are sequenced and how the two
sample databases are used
• Identify the software used in this textbook

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
2 INTRODUCTION
Imagine you’re starting up an online book retail company. How will customer orders
be recorded? Will customers be able to search for products by name or keywords? Will you
be able to analyze sales information to track profits, determine product success, and target
marketing efforts to customers? Analyzing thousands of orders could take days without
using a database. A database simplifies these tasks because it’s a storage structure that
provides mechanisms for recording, manipulating, and retrieving data.
The database used throughout this textbook is based on the activities of a
hypothetical business, an online bookseller named JustLee Books. The company sells
books via the Internet to customers throughout the United States. When a new customer
places an order, he or she provides data such as name, billing and shipping addresses, and
items ordered. The company also uses a database for all books in inventory.
To access the data required for operating JustLee Books, management relies on a
DBMS. A database management system (DBMS) is used to create and maintain the
structure of a database, and then to enter, manipulate, and retrieve the data it stores.
Creating an efficient database design is the key to using a database effectively to support
an organization’s business operations.
This chapter introduces basic database terminology and discusses the process of
designing a database for JustLee Books.

DATABASE TERMINOLOGY
Whenever a customer opens an account with a company, certain data must be collected.
In many cases, the customer completes an online form that asks for the customer’s name,
address, and so on, as shown in Figure 1-1.

Customer Information
Name: _________________________________

Street Address: __________________________

City: ________________________ Fields Record

State: _________ Zip: _________


File
Customer A

Customer B

Customer C

FIGURE 1-1 Collecting customer information

While collecting customer information, a series of characters is identified for each item.
A character is the basic unit of data, and it can be a letter, number, or special symbol.

Chapter 1

Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Another random document with
no related content on Scribd:
The Spittle Houses.
Among the properties which fell to the portion of Katherine
Legh, after the dissolution of the Hospital were “all those messuages,
houses and buyldinges, landes and tenements callyd the Spyttell
howses, with all the orchards and gardens thereunto adjoyning.” The
only property situated within the Precinct that can be traced as
belonging to Katherine, consists of (i.) four houses and gardens,
immediately to the east of the churchyard[613] and, between these and
what is now Shaftesbury Avenue, (ii.) a house, garden and orchard.
[614]
The westernmost house of (i.) was probably The Angel, which is
definitely mentioned as having been transferred to Katherine, but
the remaining houses, etc., almost certainly were the Spittle houses,
with their orchards and gardens. They are shown distinctly on Agas’s
Map (Plate 1).
Pasture Ground.
The whole of the remainder of the Precinct to the south of the
Hospital was, in the days of Elizabeth, pasture ground, and is
probably to be identified with the close lying within the Precinct,
commonly called the Pale Close, which is stated[615] to have formed
part of the property transferred to Lord Lisle. The first specific
mention of the ground occurs in 1564, when the jurors holding the
Inquisitionem Post Mortem on Francis Downes found[616] that he was
seized, inter alia, of and in four messuages and four acres of pasture
in the parish of St. Giles-in-the-Fields. Downes, it is stated,
purchased the property from Thomas Carew, son and heir of Sir
Wymonde Carew, to whom it had been sold by Lord Lisle.
The four acres subsequently passed to John Graunge, in 1566,
whose son sold them in 1611 to Robert Lloyd (otherwise called Floyd
or Flood). On the latter’s death in 1617, he was found to be seized of
and in a house with a garden on the east side, a barn and garden on
the south of the house, and a stable and two closes of pasture,
containing four acres, adjoining the barn and garden.[617] The next
reference to the ground is in 1622, when it is referred to[618] as “two
closes, formerly pasture, late converted into gardens and
purchased ... by Abraham Speckard and Dorothy his wife.” It next
passed to Sir Richard Stydolph, for Charles Tryon, his grandson,
refers in his will,[619] signed 2nd November, 1705, to “a piece or
parcell of ground containing about four acres lying in the parish of
St. Giles-in-the-Fields ... near the church ... on which said ground are
now standing ... severall houses and other buildings held by severall
leases thereof granted by Sir Richard Stydolphe ... all or most
whereof will in few years expire.” With this fact is undoubtedly to be
connected the licence granted in July, 1671, to Sir Richard Stydolph
to continue building at the back of St. Giles’s church. The licence[620]
sets forth that Stydolph had let ground “on the backside of St. Giles’
Church in the way to Pickadilly to severall poore men who build
hansome and uniforme houses, some whereof were quite covered
and the fundacions of the rest laid,” before the proclamation
prohibiting building on new foundations had been issued. In due
course, “Christopher Wren, Esq.,” viewed the place and made a
report, approving generally of the scheme and suggesting that it
might “tend in some measure to cure the noisomnesse of that part,”
provided that the building was carried out in accordance with a
settled design. On this condition the necessary permission was given,
and it was provided that two copies of the “designe, mapp or charte”
should be made, neither of which, unfortunately, is available at the
present day. Stidwell Street preserved for some time, in garbled
form, the name of the owner of these lands.
The Manor and Possessions of St. Giles’
Hospital.
Up to within a few years of its dissolution, the Hospital of St. Giles, or
rather that of Burton Lazars, in whose custody it was, owned the greater
portion of the present Parish of St. Giles, together with large estates in other
parishes.
On 2nd June, 1536, however, Henry VIII. effected an exchange[621]
with the Master of Burton Lazars, whereby the latter received certain
property in Leicestershire and transferred to the King the undermentioned:

Manors of Feltham and Heston.
Messuages, etc., in Feltham and Heston.
2 acres of meadow in the Fields of St. Martins.
25 acres of pasture lying in the village of St. Giles.[622]
5 acres of pasture near Colman’s Hedge.[622]
5 acres of pasture in Colmanhedge Field.[622]
A close called Conduit Close, of five acres.
A close called Marshland.
A messuage called The White Hart, and 18 acres of pasture thereto
belonging.
A messuage called The Rose, and a pasture thereto belonging.
A messuage called The Vine.
Reserved were the church and rectory of Feltham, and all
glebes, tithes, etc., belonging thereto.
Of the lands and houses above-mentioned, only the last four
were in the parish of St. Giles, and three of them have already been
dealt with. The Vine was on the north side of High Holborn, and its
site, with that of the close behind, is now marked by Grape Street,
formerly Vine Street.
Dudley.
Very shortly afterwards, Sir Thomas Legh, the notorious
visitor of the monasteries, made a determined effort to gain
possession of the Hospital of Burton Lazars,[623] and obtained from Thomas
Radclyff, then master, the next advowson of the Hospital for his life. This
was confirmed in March, 1536–7, by Letters Patent.[624] In 1539 the
Hospital was dissolved, and its possessions reverted to the Crown. Legh,
however, for several years continued to hold the property, and enjoy the
profits, spiritual and temporal, until on 6th May, 1544, the King granted to
Sir John Dudley, Viscount Lisle, the Hospital with all its possessions in
Leicestershire, St. Giles-in-the-Fields, and elsewhere. Very naturally, this
resulted in “contencion, varyence and stryfe” being “reysed, stirred and
dependyng betweene the said Viscount Lisle ... and the said Sir Thomas
Legh ... of for and aboute the right, tytle, interest, occupation and
possession of the seyd late Hospytall,” and the Lord Chancellor, Lord
Wriothesley, was appointed arbitrator to settle the matter.
In the course of the same year (1544) Wriothesley gave his award,
dividing the property between the two claimants, but as the arrangement
was never completed it is not necessary to give details here.[625]
It appears that when the award in question was being obtained, Lord
Lisle was absent from the country, “beinge occupied in the parties beyond
the see in and aboute the Kynges Majesties affaires concernynge his
warres,” and on his return refused to carry out the decree, claiming that “the
veray trewe and hoole tytle of the seyde Viscounte of and in the premysses”
had not been disclosed. On 24th November, 1545, Sir Thomas Legh died,
[626] leaving as his sole heir a daughter, Katherine, aged five years. His
widow, Joan, pressed for the execution of the award, and eventually on 8th
March, 1545–6, a further decree[627] was made modifying the former. In
accordance therewith an indenture[628] was on 24th March drawn up
between Lord Lisle and Dame Joan Legh, providing for the transfer to the
latter during her life, with remainder to Katherine, of the undermentioned
property.
“All those messuages, houses, and buyldinges, landes and tenements
callyd the Spyttell howses, with all the orchards, gardens thereunto
adjoyning.”
A close called St. Giles’ Wood.[629]
The Chequer.[630]
4 cottages in the occupation of John Baron.
11 cottages in the occupation of William Wilkinson.
The Maidenhead,[703] with a garden.
The Bear and 2 cottages adjoining.
Bear Close and Aldwych Close.
The George.[703]
A “mese” in the occupation of John Smith.
The Angel.
6 cottages in the occupation of William Hosyer.
The King’s Head.[703]
2 cottages near The Greyhound.
Rents from The Crown and a brewhouse.
The tithe of two fields[631] in Bloomsbury.
13 cottages in St. Andrew’s, Holborn.
The Round Rents[632] and other tenements and cottages in St.
Andrew’s, Holborn.
Lands in Essex, Sussex, Northampton, York, Northumberland and
Norfolk.
Rents from a large number of properties in the City of London, St.
Clement Danes, etc.
In Lord Lisle’s hands remained:—
“The capitall house of the seyd late Hospitall of Seynte Gyles in the
feldes and all the stables, barnes, orchards and gardeyns thereunto
adjoyninge.”
Two “meses” parcels of the same site, with orchards and gardens,
etc., late in the tenure of Dr. Borde and Master Densyll.
A close of 16 acres lying before the Great Gate, in the occupation of
Master Magnus.
A close lying within the precinct, commonly called the Pale Close.
A close of 20 acres called The Newlands.[633]
A piece of ground called The Lane.[633]
Certain lands in Norfolk.
Lisle retained the property only for a few months, selling it in the
same year[634] (1546) to John Wymond Carew, (afterwards Sir Wymond).
Sir Wymond died on 23rd August, 1549, when he was found[635] to be seized
of “and in the capital mansion of the Hospital of St. Giles-in-the-Fields and
of and in certain parcels of land with appurtenances in the parish of St.
Giles-in-the-Fields ... in his demesne as of fee.”
In December, 1561, his widow, Dame Martha Carew, gave up, in
return for an annuity, to his son Thomas “all those lands, tenements, rents,
hereditaments, etc., lieing and being in St. Gyles and Maribone, nere
London, late belonging to Burton Lazar, which she holds by way of
jointure”;[636] and Thomas sold them to Francis Downes. On the latter’s
death in 1564 they were particularised[637] as four messuages, and four
acres of pasture in St. Giles, and 20 acres of pasture in St. Marylebone.
Although the manor of St. Giles is not mentioned, it
must have been included in the portion assigned to Katherine
Legh, for it is found afterwards in her possession. Sir
Thomas’s widow died on 5th January, 1555–6[638] (having
previously remarried[639]), leaving Katherine in her sixteenth
year. Such a desirable prize was not likely to remain long in
the matrimonial market, and a husband was soon found in
Blount.
the person of Sir James Blount, Lord Mountjoy. Blount’s life
seems to have been one of continual financial worry, and his
mortgages and recognisances figure very prominently in the Close Rolls of
the period.[640]
The date of his marriage with Katherine Legh is not known precisely,
but it was certainly within 13 months of the death of her mother.[641] By
degrees the greater portion of Lady Katherine’s inheritance was converted
into ready money, and among other transactions, the manor of St. Giles was
on 18th July, 1565, mortgaged to Robert Browne, citizen and goldsmith of
London, and Thomas his son.[642] The mortgage was never redeemed,[643]
and on 20th June, 1579, Thomas Browne parted with the manor to Thos.
Harris, who in turn sold it on 12th February, 1582–3, to John Blomeson.
Blomeson retained it for nine years, and on 3rd May, 1592, sold it to “Walter
Cope, of the Strand, Esq.,”[644] afterwards Sir Walter Cope.[645] On his death
in 1614, the manor came into the possession of his daughter and sole
heiress, Isabella, who married Sir Henry Rich, and on 2nd April, 1616, it was
sold to Philip Gifford and Thos. Risley, in trust for Henry, third Earl of
Southampton.[646]
On the death of the fourth earl in 1668, it became the
property of his daughter, Lady Rachel Russell, from whom it
descended to the Dukes of Bedford, who now hold it.

Russell.
LIV.—THE CHURCH OF ST. GILES-IN-THE-
FIELDS.
First Church.
In a book,[647] now in the possession of the Holborn
Metropolitan Borough Council, containing a number of extracts
apparently copied from an earlier volume, is the copy of a document
dated 26th January, 1630–31, in which it is stated that Queen Maud,
about the year 1110, here built a church “pulchram satis et
magnificam,” and called it by the name of St. Giles-in-the-Fields. It is
possible that the statement is merely based on the fact of the
foundation of the hospital, including the church, at about that date.
Although there is no record of any presentation to the living
before the Hospital was suppressed in 1539, the fact that the parish
of St. Giles was in existence at least as early as 1222[648] necessitates
the assumption that the church was partially used for parochial
purposes. After the suppression of the Hospital the whole fabric
became parochial.
The earliest institution that has been found to[649] this church
is dated 20th April, 1547, and was at the presentation of Sir Wymond
Carew. On the next occasion (1571) the privilege was exercised by
Queen Elizabeth, and since that time the patronage has always been
in the hands of the Crown.
Very little information remains as to the architectural
character of the church (whether the original structure or not) at the
time of the dissolution.[650]
Besides the high altar there must have been an altar to the
patron saint, St. Giles. There is also evidence of the existence of a
chapel of St. Michael, for in the 46th year of Henry III. Robert of
Portpool bequeathed certain rents to provide for the maintenance of
a chaplain “to celebrate perpetually divine service in the chapel of St.
Michael, within the hospital church of S. Giles.”[651]
According to an order of the Vestry of 8th August, 1623, there
then existed a nave and a chancel, both with pillars, clerestory walls
over, and aisles on either side.
The Vestry minutes of 21st April, 1617, record the erection of a
steeple with a peal of bells, but from the fact that “casting the bells” is
mentioned as well as the buying of new bells, and from the reference
to it in the following year (9th September, 1618) as “the new steeple,”
it seems probable that something of the kind had existed before.
Parton[652] says that there was in early times a small round bell tower,
with a conical top, at the western end of the church, but his authority
for the statement is very doubtful.
The size of the church, measured within the walls, was 153 feet
by 65 feet.[653]
Second Church.
The church was, in the early years of the 17th century, in
danger of falling, as indeed some of it did, causing a void at the upper
end of the chancel “which was stored with Lumber, as the Boards of
Coffins and Deadmen’s Bones.” A screen was erected at the expense
of Lady Dudley “to hide it from the beholders’ eyes, which could not
but be troubled at it.”[654] A further collapse caused the parishioners
to decide to erect a new church. This was begun in 1623 and finished
in 1631. The cost of building amounted to £2,068, all of which, with
the exception of £252 borrowed, was obtained from voluntary
offerings. The largest contributor was Lady Dudley, who gave £250,
and, in addition, paid for the paving of the church and chancel. A
small sketch of the church is given by Hollar in his plan of 1658
(Plate 3), and a lithograph (here reproduced) by G. Scharf is in
Parton’s Hospital and Parish of St. Giles-in-the-Fields.
Hatton[655] gives the length as 123 feet and the breadth 57 feet.
The church and steeple appear to have been built of rubbed brick[656],
surmounted with battlements, and coped with stone.[656] A western
gallery was erected in 1671, and others to the north and south in
1676–7.
The chancel had a large east window, and one on either side.
The nave had a window over the chancel arch, and a large one at the
west end.
There were north and south aisles, which must have been of
considerable height to admit of the galleries which were
subsequently added. They appear to have been of three bays,[657] with
two windows in each. All the windows, except the westernmost one
in the north aisle, were glazed with coloured and painted glass. There
were three doors to the church, one beneath the west window and
others under the third window from the east of the north aisle and
the westernmost window of the south aisle.
No window is mentioned by Strype at the west end of the
north aisle, so that it is probable that the tower was attached to the
church in this situation. This had battlements and was provided with
a vane.
The interior was well furnished and provided with numerous
ornaments, many of which were the gift of Lady Dudley.[658] Chief
among the latter must be mentioned an elaborate screen of carved
oak placed where one had formerly stood in the old church. This, as
stated in a petition to Parliament in 1640,[659] was “in the figure of a
beautifull gate, in which is carved two large pillars, and three large
statues: on the one side is Paul, with his sword; on the other
Barnabas, with his book; and over them Peter with his keyes. They
are all set above with winged cherubims, and beneath supported by
lions.”
The church had a pair of organs with case richly gilded, and
the organ loft was painted with a representation of the Twelve
Apostles.
Very costly and handsome rails were provided to guard the
altar. This balustrade extended the full width of the chancel, and
stood 7 or 8 feet east of the screen at the top of three steps.
The altar stood close up to the east wall, with a desk raised
upon it in various degrees of advancement.
The upper end of the church was paved with marble, and six
bells were provided in the steeple.
In 1640 the reformers were very bitterly incensed against the
rector with regard to the fittings in the church, and a petition was
presented to Parliament enumerating the various articles which were
considered superstitious and idolatrous. The result of this action was
that most of the ornaments were sold in 1643, while Lady Dudley was
still alive.
After the Restoration the church was repaired and decorated,
and a striking clock and dials added to the tower.
In 1716 the church had a very valuable addition made to its
plate in the form of an engraved gold communion cup, weighing 45
ozs., which had been purchased pursuant to the will of Thomas
Woodville, a parishioner who died at sea. This valuable chalice,
together with the rest of the sacramental and other plate, was stolen
from the vestry room in 1804.
The church was obviously not well constructed, for by 1715 it
was reported to be in a ruinous condition. Under a moderate
computation it appeared that it would cost £3,000 to put it in order.
The ground outside being above the floor of the church, caused the
air to be damp and unwholesome, and proved inconvenient in other
ways. In these circumstances it was thought better to recommend a
complete reconstruction of the church.
The parishioners accordingly petitioned that the church
should be included in the 50 new churches to be built in the cities of
London and Westminster and the suburbs, and the necessary
authority for this was eventually obtained in 1718.[660] Nothing,
however, was done until 1729, when an arrangement was come to
whereby the Parish of St. Giles agreed to make provision for the
stipend of the rector of the new parish of St. George, Bloomsbury, on
condition that the Commissioners acting under the Act of Queen
Anne should pay a sum not exceeding £8,000 for the rebuilding of
St. Giles Church. The arrangement was sanctioned by an Act of
Parliament of the same year.[661] By 1731, Henry Flitcroft had
prepared plans and entered into an agreement to begin pulling down
by 31st August of that year, and to have the new church completely
finished on or before 25th December, 1733. For this work the
architect was to receive £7,030, but in fact the contract was exceeded
by over £1,000, Flitcroft’s receipt being for £8,436 19s. 6d.[662]
Third Church.
The interior dimensions of the church are as follows: length
from the west wall to the east wall of the chancel, 102 feet; length
from the west wall of the nave to the east wall of the nave, 74 feet;
depth of the chancel, 8 feet; width of the nave and aisles, 57 feet 6
inches.
The plan is a nave of five bays with side aisles (Plate 43), over
which are galleries, these being connected by a western one in the
last bay of the nave. A shallow sanctuary is placed at the eastern end,
and at the west is the steeple and a vestibule containing the
entrances and the staircases to the galleries and tower.
The general treatment of the exterior of the church (Plates 45
and 47) is plain in character, but of pleasing effect. The walling is
faced with Portland stone rusticated (chamfered at the joints) to a
projecting band marking the gallery level. Above, the walling is of
plain ashlaring with rusticated quoins. The gallery windows have
semi-circular heads with keystones, moulded architraves and plain
impost blocks. The whole is surmounted by a bold modillion cornice,
with blocking course above.
Emphasis is given to the sanctuary by a pediment and by a
large semi-circular-headed window with panels on either side
forming a decorative composition.
The western end has a similar pediment with the tower rising
above. The central entrance doorway lacks emphasis and the
importance which its position seems to require, and is almost the
same in design as those to the vestibules facing north and south,
which are relatively unimportant. On the main frieze below the
cornice is the inscription—H. Flitcroft, Architectus.
Rising immediately behind the western pediment is the
steeple of about 150 feet in height.
Flitcroft’s able design was evidently influenced by that of
Gibbs for the neighbouring church of St. Martin-in-the-Fields, but it
lacks the vigorous character of that noble structure. The banding to
the obelisk above the belfry tends to make this feature appear
somewhat overheavy in comparison with the graceful lantern
beneath. The change from square to octagon at the clock face level is
cleverly managed, and will bear comparison with the same feature at
St. Martin’s Church.
The following extract from A Critical Review of the Public
Buildings, Statues and Ornaments in and About London and
Westminster made by Ralph in 1734, is of interest, as it gives an
opinion upon the architecture of this church shortly after its
erection:—
“The new church of St. Giles’s is one of the most simple and elegant
of the modern structures: it is rais’d at very little expence, has very few
ornaments, and little beside the propriety of its parts, and the harmony of
the whole, to excite attention, and challenge applause: yet still it pleases,
and justly too; the east end is both plain and majestick, and there is nothing
in the west to object to but the smallness of the doors, and the poverty of
appearance that must necessarily follow. The steeple is light, airy and
genteel, argues a good deal of genius in the architect, and looks very well
both in comparison with the body of the church, and when ’tis consider’d as
a building by itself, in a distant prospect.”
Ralph disliked the position of the church, and would have
altered its direction, making what is the east end the main front, and
placing it in such a manner as to have ended the vista of Broad
Street.
The interior (Plate 49) is much finer than the exterior would
suggest, and is an excellent example of a well thought-out design.
Square panelled piers rising to the underside of the galleries support
Ionic columns with block entablatures, all of Portland stone (Plate
46). These carry the roof and ceiling. The ceiling of the nave is
barrel-vaulted in form, panelled and divided into bays by mouldings.
The ceilings of the aisle-galleries (Plates 44 and 51) take the form of a
species of groined vaults intersecting the barrel ceiling of the nave.
The whole is covered by a roof of one span.
The treatment of the galleries is more than usually
satisfactory, for the fronts, instead of being housed into the columns
—giving the suggestion of a necessary after addition—rest
comfortably upon the piers supporting the columns, and, if taken
away, would mar the proportion of the columns to their pedestals.
The shallow sanctuary is almost the full width of the nave. It is
ceiled with an ornamental panelled barrel vault following that of the
nave, and the eastern wall is filled by an architectural composition
harmonising with the general treatment of the nave.
On the frieze of the altar piece (Plate 51) is carved a cherub’s
head, and above is a scrolled pediment having in the centre a pelican
feeding her young in the nest.
The lower panels on either side of the altar and of the
sanctuary, are four in number, and enclosed in carved wood frames.
Two contain pictures; that of Moses to the left (Plate 52) and of
Aaron to the right of the altar.
The pulpit is of carved oak with inlay panels. The ironwork to
the choir balustrade is of wrought work, and the old iron bound chest
in the north-west vestibule is of interest.
The organ (Plate 50) is of considerable interest, and Mr.
George E. Dunn, the organist, has been good enough to supply the
following information. The instrument was built by the celebrated
Bernard Schmidt (known as Father Smith) for the second church in
1671, when he was 41 years old. He was known chiefly for the
perfection of his diapason stops—the true organ tone—and those in
this organ are among his best specimens. When the church was
rebuilt by Flitcroft he evidently did not desire to interfere with the
organ, and adopted the unusual expedient of erecting the tower of
the new church partially round the organ; consequently the back and
part of two sides are covered by the walling of the tower. Father
Smith’s original specification remained until 1856, when many of the
stops had become decayed after 180 years’ use. Dr. G. C. Verrinder,
the organist at that time, had it restored and enlarged by Messrs.
Gray and Davidson, and further repairs and alterations were made in
1884 by the same firm, under the instructions of the late Dr. W.
Little, the organist at that date. In 1889–1900 further alterations
were made by Messrs. Henry Jones and Sons, in collaboration with
the present organist. But through all the decay and changes the
organ has undergone Father Smith’s original diapasons in the front
organ remain and are still perfect. The blowing is done by hand, but
the well-balanced lever renders this comparatively easy, while,
despite the retention of the old tracker action, the instrument is quite
free from the “rattling” so often found in these old actions. In front
are carved the royal arms of George I.
All the glass to the windows, except a small panel (Plate 52) in
the west window of the south vestibule, is modern. This fragment,
which is probably from the earlier church, represents St. Giles’s tame
hind struck by the arrow.
The majority of the monuments in the church belong to the
19th century. Those of earlier date are as follows:—
On the north-east wall of the nave is a tablet of white marble,
on a black marble slab, with the following inscription:
H. S. E.
GULIELMUS WATSON EQUES
SOCIETATIS REGALIS APUD LONDINUM,
ET COLLEGII REGALIS MEDICORUM SOCIUS,
REGALI ETIAM ACADEMIÆ MADRITENSI ADSCRIPTUS,
IN UNIVERSITATIBUS HALÆ ET VIRTEMBERGIÆ
MEDICINÆ DOCTOR
HONORIS ERGO ELECTUS
VIR SUI TEMPORIS
SCIENTIÆ INDAGATOR STUDIOSISSIMUS:
ARTIS MEDICÆ ET BOTANICÆ, NECNON PHILOSOPHIÆ
NATURALIS,
PRÆCIPUE QUOD AD VIM ELECTRICAM ATTINET
INTER PRIMOS PERITUS.
OBIIT DIE MAII 10. A.D. 1787. ÆTAT. SUÆ 72.
HOC MARMOR NEC SUPERBUM,
NEC QUIDQUAM HABENS ORNATUS:
PRAETER IPSUM EJUS NOMEN,
FILIO PIENTISSIMO LEGANTE,
TESTAMENTI CURATORES
PONI JUSSERUNT.
Above, surmounted by a crest, is placed a coat of arms:
(Argent) on a chevron engrailed (Azure) between three martlets
(Sable) as many crescents (of the first).
On the wall of the north aisle is a white marble tablet to the
memory of John Barnfather, who died on 17th September, 1793, in
the 75th year of his age. A tribute is paid to his strictness and
impartiality in the execution of his duties as a justice of the peace,
and to his “mildness of Temper and benignity of mind” in private life.
The tablet is surmounted by a mourning female figure, and fixed on
an oval slab of black marble.
A little to the west along the aisle is a tablet of black marble,
with white marble cornice and base, bearing an inscription to the
memory of other members of the same family, viz., Robert
Barnfather, who died on 23rd October, 1741, aged 54, and his wife
Mary, who died on 6th December, 1754, aged 67. A long account of
the latter’s many good qualities is contributed by “their most
Affectionate Son.”
Still further westward is a tablet with the following
inscription:—
NEAR UNTO THIS PLACE LYETH THE BODY OF
ANDREW MARVELL ESQUIRE, A MAN SO ENDOWED BY
NATURE
SO IMPROVED BY EDUCATION, STUDY & TRAVELL, SO
CONSUMMATED
BY PRACTICE & EXPERIENCE: THAT JOINING THE MOST
PECULIAR GRACES
OF WIT & LEARNING WITH A SINGULAR PENETRATION &
STRENGTH OF
JUDGMENT, & EXERCISING ALL THESE IN THE WHOLE
COURSE OF HIS LIFE
WITH AN UNALTERABLE STEADINESS IN THE WAYS OF
VIRTUE, HE BECAME
THE ORNAMENT & EXAMPLE OF HIS AGE; BELOVED BY GOOD
MEN, FEAR’D
BY BAD, ADMIR’D BY ALL, THO IMITATED ALASS! BY FEW, &
SCARCE FULLY
PARALLELLED BY ANY. BUT A TOMB STONE CAN NEITHER
CONTAIN HIS CHARACTER,
NOR IS MARBLE NECESSARY TO TRANSMIT IT TO POSTERITY,
IT WILL BE ALWAYS
LEGIBLE IN HIS INIMITABLE WRITINGS. HE SERVED THE
TOWN OF KINGSTON
UPON HULL, ABOVE 20 YEARS SUCCESSIVELY IN
PARLIAMENT, & THAT WITH SUCH
WISDOM, DEXTERITY, INTEGRITY & COURAGE AS BECOMES A
TRUE PATRIOT
HE DYED THE 16. AUGUST 1678 IN THE 58TH. YEAR OF HIS AGE.
SACRED
TO THE MEMORY OF ANDREW MARVELL ESQR. AS A
STRENUOUS ASSERTER OF
THE CONSTITUTIONS, LAWS & LIBERTIES OF ENGLAND,
AND OUT OF FAMILY AFFECTION & ADMIRATION OF
THE UNCORRUPT PROBITY OF HIS LIFE & MANNERS
ROBERT NETTLETON OF LONDON MERCHANT HIS GRAND
NEPHEW
HATH CAUSED THIS SMALL MEMORIAL OF HIM
TO BE ERECTED IN THE YEAR 1764.
Further is a tablet of white marble, in the form of an
ornamental cartouche, recording the death of John Hawford and
Elizabeth his wife, and their two sons John and William. All four
deaths occurred between December, 1712, and July, 1715.
Next is a tablet to the memory of Thomas Edwards, who died
on 9th July, 1781, in the 71st year of his age. The tablet is of white
marble, surmounted by a black cinerary urn, on an oval slab of
painted marble. The inscription records his various bequests for the
use of the poor of the parish, and explains that the monument was
erected by his widow not only as a tribute of gratitude and affection,
but with a view to inciting others “whom God has blessed with
Abilities and Success” to follow his example. Her own death, on 23rd
November, 1818, is also mentioned.
Still in the north aisle, but near the entrance, is a tomb
bearing a white marble recumbent effigy of Lady Frances Kniveton,
resting on a black marble slab above a stone base. This is one of the
two memorials preserved from the second church. The inscription,
contained on a white marble tablet, reads as follows:—
In Memory of the Right Honble. Lady Frances Kniveton,
(Wife of Sr. Gilbert Kniveton,/of Bradley, in the County of Derby
Bart.) lyeth buried in the Chancel of this Church./She was one of the
5 Daughters & Co-heirs of the Rt. Honble. Sr. Robert Dudley Kt. Duke
of the/Empire; by the Lady Alice his Wife & Dutchess. which
Robert. was Son of the Rt. Honble./Robert Dudley, late Earle of
Leicester. & his Dutchess was Daughter of Sr. Tho: Leigh,/and Aunt

You might also like