Learning SQL 2nd Edition Alan Beaulieu Instant Download
Learning SQL 2nd Edition Alan Beaulieu Instant Download
https://ebookfinal.com/download/learning-sql-2nd-edition-alan-beaulieu/
https://ebookfinal.com/download/learning-sql-1st-edition-alan-
beaulieu/
https://ebookfinal.com/download/murach-s-oracle-sql-and-pl-sql-for-
developers-2nd-edition-joel-murach/
https://ebookfinal.com/download/beginning-t-sql-2012-2nd-edition-
scott-shaw/
Database Systems Using Oracle A Simplified Guide to SQL
and PL SQL 2nd Edition Nilesh Shah
https://ebookfinal.com/download/database-systems-using-oracle-a-
simplified-guide-to-sql-and-pl-sql-2nd-edition-nilesh-shah/
https://ebookfinal.com/download/sql-a-beginner-s-guide-2nd-edition-
robert-sheldon/
https://ebookfinal.com/download/sql-injection-attacks-and-defense-2nd-
ed-edition-clarke/
https://ebookfinal.com/download/impact-techniques-for-therapists-1st-
edition-danie-beaulieu/
PROC SQL Beyond the Basics Using SAS 2nd edition Edition
Lafler
https://ebookfinal.com/download/proc-sql-beyond-the-basics-using-
sas-2nd-edition-edition-lafler/
Learning SQL 2nd Edition Alan Beaulieu Digital Instant
Download
Author(s): Alan Beaulieu
ISBN(s): 9780596555580, 059655558X
Edition: 2
File Details: PDF, 2.10 MB
Year: 2009
Language: english
SECOND EDITION
Learning SQL
Alan Beaulieu
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (http://safari.oreilly.com). For more information, contact our corporate/
institutional sales department: (800) 998-9938 or [email protected].
Printing History:
August 2005: First Edition.
April 2009: Second Edition.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. Learning SQL, the image of an Andean marsupial tree frog, and related trade dress
are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a
trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and author assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-
tained herein.
TM
ISBN: 978-0-596-52083-0
[M]
1239115419
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
1. A Little Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Introduction to Databases 1
Nonrelational Database Systems 2
The Relational Model 4
Some Terminology 6
What Is SQL? 7
SQL Statement Classes 7
SQL: A Nonprocedural Language 9
SQL Examples 10
What Is MySQL? 12
What’s in Store 13
iii
Column Value Violations 37
Invalid Date Conversions 37
The Bank Schema 38
3. Query Primer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Query Mechanics 41
Query Clauses 43
The select Clause 43
Column Aliases 46
Removing Duplicates 47
The from Clause 48
Tables 49
Table Links 51
Defining Table Aliases 52
The where Clause 52
The group by and having Clauses 54
The order by Clause 55
Ascending Versus Descending Sort Order 57
Sorting via Expressions 58
Sorting via Numeric Placeholders 59
Test Your Knowledge 60
4. Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Condition Evaluation 63
Using Parentheses 64
Using the not Operator 65
Building a Condition 66
Condition Types 66
Equality Conditions 66
Range Conditions 68
Membership Conditions 71
Matching Conditions 73
Null: That Four-Letter Word 76
Test Your Knowledge 79
iv | Table of Contents
Self-Joins 93
Equi-Joins Versus Non-Equi-Joins 94
Join Conditions Versus Filter Conditions 96
Test Your Knowledge 97
Table of Contents | v
Generating Rollups 152
Group Filter Conditions 155
Test Your Knowledge 156
9. Subqueries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
What Is a Subquery? 157
Subquery Types 158
Noncorrelated Subqueries 159
Multiple-Row, Single-Column Subqueries 160
Multicolumn Subqueries 165
Correlated Subqueries 167
The exists Operator 169
Data Manipulation Using Correlated Subqueries 170
When to Use Subqueries 171
Subqueries As Data Sources 172
Subqueries in Filter Conditions 177
Subqueries As Expression Generators 177
Subquery Wrap-up 181
Test Your Knowledge 181
vi | Table of Contents
12. Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Multiuser Databases 217
Locking 217
Lock Granularities 218
What Is a Transaction? 219
Starting a Transaction 220
Ending a Transaction 221
Transaction Savepoints 223
Test Your Knowledge 225
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Programming languages come and go constantly, and very few languages in use today
have roots going back more than a decade or so. Some examples are Cobol, which is
still used quite heavily in mainframe environments, and C, which is still quite popular
for operating system and server development and for embedded systems. In the data-
base arena, we have SQL, whose roots go all the way back to the 1970s.
SQL is the language for generating, manipulating, and retrieving data from a relational
database. One of the reasons for the popularity of relational databases is that properly
designed relational databases can handle huge amounts of data. When working with
large data sets, SQL is akin to one of those snazzy digital cameras with the high-power
zoom lens in that you can use SQL to look at large sets of data, or you can zoom in on
individual rows (or anywhere in between). Other database management systems tend
to break down under heavy loads because their focus is too narrow (the zoom lens is
stuck on maximum), which is why attempts to dethrone relational databases and SQL
have largely failed. Therefore, even though SQL is an old language, it is going to be
around for a lot longer and has a bright future in store.
ix
Why Use This Book to Do It?
The SQL language is broken into several categories. Statements used to create database
objects (tables, indexes, constraints, etc.) are collectively known as SQL schema state-
ments. The statements used to create, manipulate, and retrieve the data stored in a
database are known as the SQL data statements. If you are an administrator, you will
be using both SQL schema and SQL data statements. If you are a programmer or report
writer, you may only need to use (or be allowed to use) SQL data statements. While
this book demonstrates many of the SQL schema statements, the main focus of this
book is on programming features.
With only a handful of commands, the SQL data statements look deceptively simple.
In my opinion, many of the available SQL books help to foster this notion by only
skimming the surface of what is possible with the language. However, if you are going
to work with SQL, it behooves you to understand fully the capabilities of the language
and how different features can be combined to produce powerful results. I feel that this
is the only book that provides detailed coverage of the SQL language without the added
benefit of doubling as a “door stop” (you know, those 1,250-page “complete referen-
ces” that tend to gather dust on people’s cubicle shelves).
While the examples in this book run on MySQL, Oracle Database, and SQL Server, I
had to pick one of those products to host my sample database and to format the result
sets returned by the example queries. Of the three, I chose MySQL because it is freely
obtainable, easy to install, and simple to administer. For those readers using a different
server, I ask that you download and install MySQL and load the sample database so
that you can run the examples and experiment with the data.
x | Preface
Chapter 6, Working with Sets, is all about data sets and how they can interact within
queries.
Chapter 7, Data Generation, Conversion, and Manipulation, demonstrates several
built-in functions used for manipulating or converting data.
Chapter 8, Grouping and Aggregates, shows how data can be aggregated.
Chapter 9, Subqueries, introduces the subquery (a personal favorite) and shows
how and where they can be utilized.
Chapter 10, Joins Revisited, further explores the various types of table joins.
Chapter 11, Conditional Logic, explores how conditional logic (i.e., if-then-else)
can be utilized in select, insert, update, and delete statements.
Chapter 12, Transactions, introduces transactions and shows how to use them.
Chapter 13, Indexes and Constraints, explores indexes and constraints.
Chapter 14, Views, shows how to build an interface to shield users from data
complexities.
Chapter 15, Metadata, demonstrates the utility of the data dictionary.
Appendix A, ER Diagram for Example Database, shows the database schema used
for all examples in the book.
Appendix B, MySQL Extensions to the SQL Language, demonstrates some of the
interesting non-ANSI features of MySQL’s SQL implementation.
Appendix C, Solutions to Exercises, shows solutions to the chapter exercises.
Preface | xi
Indicates a tip, suggestion, or general note. For example, I use notes to
point you to useful new features in Oracle9i.
Indicates a warning or caution. For example, I’ll tell you if a certain SQL
clause might have unintended consequences if not used carefully.
How to Contact Us
Please address comments and questions concerning this book to the publisher:
O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international or local)
707-829-0104 (fax)
O’Reilly maintains a web page for this book, which lists errata, examples, and any
additional information. You can access this page at:
http://www.oreilly.com/catalog/9780596520830
To comment or ask technical questions about this book, send email to:
[email protected]
For more information about O’Reilly books, conferences, Resource Centers, and the
O’Reilly Network, see the website at:
http://www.oreilly.com
xii | Preface
If you feel your use of code examples falls outside fair use or the permission given above,
feel free to contact us at [email protected].
Acknowledgments
I would like to thank my editor, Mary Treseler, for helping to make this second edition
a reality, and many thanks to Kevin Kline, Roy Owens, Richard Sonen, and Matthew
Russell, who were kind enough to review the book for me over the Christmas/New
Year holidays. I would also like to thank the many readers of my first edition who were
kind enough to send questions, comments, and corrections. Lastly, I thank my wife,
Nancy, and my daughters, Michelle and Nicole, for their encouragement and
inspiration.
Preface | xiii
CHAPTER 1
A Little Background
Before we roll up our sleeves and get to work, it might be beneficial to introduce some
basic database concepts and look at the history of computerized data storage and
retrieval.
Introduction to Databases
A database is nothing more than a set of related information. A telephone book, for
example, is a database of the names, phone numbers, and addresses of all people living
in a particular region. While a telephone book is certainly a ubiquitous and frequently
used database, it suffers from the following:
• Finding a person’s telephone number can be time-consuming, especially if the
telephone book contains a large number of entries.
• A telephone book is indexed only by last/first names, so finding the names of the
people living at a particular address, while possible in theory, is not a practical use
for this database.
• From the moment the telephone book is printed, the information becomes less and
less accurate as people move into or out of a region, change their telephone num-
bers, or move to another location within the same region.
The same drawbacks attributed to telephone books can also apply to any manual data
storage system, such as patient records stored in a filing cabinet. Because of the cum-
bersome nature of paper databases, some of the first computer applications developed
were database systems, which are computerized data storage and retrieval mechanisms.
Because a database system stores data electronically rather than on paper, a database
system is able to retrieve data more quickly, index data in multiple ways, and deliver
up-to-the-minute information to its user community.
Early database systems managed data stored on magnetic tapes. Because there were
generally far more tapes than tape readers, technicians were tasked with loading and
unloading tapes as specific data was requested. Because the computers of that era had
very little memory, multiple requests for the same data generally required the data to
1
be read from the tape multiple times. While these database systems were a significant
improvement over paper databases, they are a far cry from what is possible with today’s
technology. (Modern database systems can manage terabytes of data spread across
many fast-access disk drives, holding tens of gigabytes of that data in high-speed mem-
ory, but I’m getting a bit ahead of myself.)
Over the first several decades of computerized database systems, data was stored and
represented to users in various ways. In a hierarchical database system, for example,
data is represented as one or more tree structures. Figure 1-1 shows how data relating
to George Blake’s and Sue Smith’s bank accounts might be represented via tree
structures.
Credit of $77.86
on 2004-04-04
Transactions
George and Sue each have their own tree containing their accounts and the transactions
on those accounts. The hierarchical database system provides tools for locating a par-
ticular customer’s tree and then traversing the tree to find the desired accounts and/or
Debit of $100.00
Checking on 2004-01-22
Checking
George Blake Credit of $25.00
on 2004-02-05
Savings
Debit of $250.00
on 2004-03-09 Savings
Debit of $1000.00
on 2004-03-25
Checking MoneyMkt
Credit of $138.50
on 2004-04-02
Sue Smith MoneyMkt
Credit of $77.86
on 2004-04-04
Line of credit Line of credit
Debit of $500.00
on 2004-03-27
In order to find the transactions posted to Sue’s money market account, you would
need to perform the following steps:
1. Find the customer record for Sue Smith.
2. Follow the link from Sue Smith’s customer record to her list of accounts.
3. Traverse the chain of accounts until you find the money market account.
4. Follow the link from the money market record to its list of transactions.
One interesting feature of network database systems is demonstrated by the set of
product records on the far right of Figure 1-2. Notice that each product record (Check-
ing, Savings, etc.) points to a list of account records that are of that product type.
Account records, therefore, can be accessed from multiple places (both customer records
and product records), allowing a network database to act as a multiparent hierarchy.
Introduction to Databases | 3
Both hierarchical and network database systems are alive and well today, although
generally in the mainframe world. Additionally, hierarchical database systems have
enjoyed a rebirth in the directory services realm, such as Microsoft’s Active Directory
and the Red Hat Directory Server, as well as with Extensible Markup Language (XML).
Beginning in the 1970s, however, a new way of representing data began to take root,
one that was more rigorous yet easy to understand and implement.
Customer Account
cust_id fname lname account_id product_cd cust_id balance
1 George Blake 103 CHK 1 $75.00
106 MM 2 $500.00
107 LOC 2 0
Product Transaction
product_cd name txn_id txn_type_cd account_id amount date
CHK Checking 978 DBT 103 $100.00 2004-01-22
There are four tables in Figure 1-3 representing the four entities discussed so far:
customer, product, account, and transaction. Looking across the top of the customer
OAyyiJ^
HISTORY OF CAMERON COUNTY. 863 the Pine Street
Church, also built of hewn logs, were erected about IS'26. The first
high-grade schools in the coirnty were established at
Sinnemahoning, in 1864-65. These schools were founded by John
Brooks, who employed principals and teachers and among these
mentioned are Miss Henrietta Baker (a graduate of Oxford College,
Penn. ), Prof. J. H. Vosburg and Mrs. J. H. Vosburg, of Binghamton,
N. Y., Miss Alice M. Lindsley (preceptress of the Waverly Institute, N.
Y.), Miss E. Baldwin, of London, Rev. A. B. Miller, of Gettysburg
College, Penn., and Profs. A. B. Clough, of Poughkeepsie. N. Y.. and
B. W. Hollen, of Iron City College, Penn. The last two named were
principals of the commercial department. These schools were
suspended in 1873, on account of financial embarrassment. The first
county su])erintendent of common schools in the county of Cameron
was Richard Cbadwick, who was elected to office in 1861 for two
years. The second was Francis J. Chadwick, elected in 1863 for a
term of three years. The third was J. B. Johnson, who was elected in
1866 and re-elected in 1869, and again in 1872, holding it altogether
for three consecutive, or during nine, years. The next was N. H.
Schenck, who was elected in 1875. Prof. Pearsall is now
superintendent of schools. In November, 1866, Mrs. J. B. Johnson
opened a select school in Felt's block. The district school was then
presided over by Miss Anna Hendry and Miss Williamson. The report
of Supt. Pearsall for year ending June 4, 1888, gives the fol lowing
statistics: School-houses, 34; school rooms, 44; schools, 43; graded
schools, 14; number of districts supplying text-books free, 1 ;
number in which Bible is read, 36; number of male teachers, 6; of
female, 48, of whom 8 held professional certificates; male pupils,
711, female pupils. 716— total 1,427, of whom 1,1 14 attended
school; school tax, §11,987.50; State moneys, 81,429.61, of which
the sum of $8,980.39 was paid teachers, the total expenditure being
812.446.59. The Teachers' Institute was organized in 1867, and the
seventh annual meeting held December 2, 1873, with J. B. Johnson,
superintendent of schools, presiding. Miss M. C. Simpson presided
over the business meeting with J. W. Eldred, secretary. PHYSICIANS.
In the history of Elk county reference is made to the first physician
who settled on Bennett's branch. The first physician who practiced
within the limits of this county was Dr. Kincaid. *He settled near the
present village of Sterling Run, and for years treated the various
diseases that flesh is heir to. One incident occurred in his practice,
that is remembered distinctly by the people who were living in the
country at that time, that is somewhat amusing. He was treating a
patient at the old Dent place on Bennett's branch. Leaving his
saddle-bags outside, near the creek, while he went within the house,
a cer tain cow, not having the fear of the god ^Esculapius before
her eyes, and instigated by the verj' spirit of mischief and with
malice aforethought proceeded to eat the saddle bags and all their
contents, and when the Doctor returned she was quietly chewing the
cud. If the proof of the pudding is in the chewing of the bag, by a
parity of reasoning that cow should have obtained the full benefit of
the medicine, but what was the actual effect upon the animal or
what became of her, or how the Doctor replenished his stores, this
deponent sayeth not, as history is entirely silent upon those points.
We have to add * From .John Brooks' Centeuiiial sketch.
864 HISTOKY OF CAMEKON COUNTY. that the Doctor was
the father of the great Baptist missionary to India, Eugenio Kincaid.
In the sketches of the several townships, villages and boroughs
mention is also made of the old physicians who practiced within
what is now Cameron county. The Cameron County Medical Society
was organized July 25, 1879, and the following ofScers elected:
President, W. H. DeLong, M. D., Emporium; vice-president, S. S.
Smith, M. D. , Driftwood; secretary, E. O. Bardwell, M. D., Emporium;
treasurer, R. P. Heilman, M. D. , Emporium. The list of members
comprises AV. H. DeLong, R. P. Heilman, E. O. Bardwell and S. S.
Smith, of Emporium; E. G. Torbert, of Driftwood, and C. S. French,
of Sterling. February 16, 1882, the by-laws were approved by the
State Society, and in May, 1882, the society was represented in the
Pennsylvania State Society by E. O. Bardwell. In 1883, owing to the
paucity of the membership, the society voted to join and did join the
Elk County Medical Society. At the present time all the regular
physicians in Cameron county are members in good standing of the
Elk County Medical Society. John C. McAllister, Jr. . registered in
December, 1889, as a physician of Cameron county. In ]\Iarch of
that year he graduated from the College of Physicians and Surgeons,
Baltimore, Md. Dr. J. G. Bryan died at Jacksonville, Fla. , in
December, 1889. COUNTY ASSOCIATIONS. Agricultural Societies —
.The first agricultural society was organized September 20, 1876,
with the following named officers: President, John Brooks; vice-
presidents, J. L. Cook, C. H. Sage; secretary, A. H. Boynton;
treasurer, J. Henry Cochran. With a view to the holding of a county
fair early in October, the following gentlemen were selected as a
committee of arrangements: Emporium — Dr. J. G. Bryan, J. W.
Cochran, J. B. Newton, George \V. Warner, John Day, J. W. Phelps, C.
B. Gould, Jonathan GifFord, L. G. Cook, S. Kirk, C. C. Fay, J. C.
Johnson, George Metzger, H. C. Olmsted, L. Taggart, D. P. Catlin,
Joel Shives, Henry Edgcomb, J. M. Judd. Riley Warner, Dr. J. T.
Lanning. J. W. Frank, R. M. Overhiser, E. R. Mayo, C. Sweazey, M. M.
Larrabee, Seneca Freeman. James Matteson, A. G. Holbrook, J. F.
Parsons, H. C. Rockwell, G. A. Walker, I. Morro, Amos Finton, J. P.
Felt, Edward J. Ralph, N. Seger, F. D. Leet, M. C. Tulis. Shippen— J.
S. Wiley, W. Russell, Allen Russell, Sol. Ross, John Jackson, Charles
Weller, L. B. Jones, L. A. Freeman, Noah Parker, Karl Zimmer, N. P.
Minard, I. L. Craven, George Thayer, R. E. Thompson, Gillis Bliss, B.
S. Morrison, John Morrison, L. T. More, J. R. Biickwalter, W. C. Clark,
C. C. Craven. George Dodge, B. Sweazey, Philip Lewis, Morris Lewis,
John C. Lewis. William Lewis. Aden Housler, Joseph Housler, B. L.
Emery, Franklin Hausler, John Chandler, Henry Haines, Henry Lewis,
Penrose Chadwick. Portage — L. Lucore, D. Burlingame, AV. L.
Ensign, N. D. Sizer, E. D. Sizer. Lumber— P. W. Whiting. W. P. Herrick,
Philip Smith, John Chapman, C. C. Devliug. C. C. Lyman, E. P. Lester,
J. H. Barrows, G. H. Mayo, Matt. Phoenix, V. A. Brooks, Milo Bull. D.
D. Alderfer, H. J. Smith. Joseph Ritchie, John Summerson. Gibson —
John Mason, James Wylie, B. V. Wykoff, Hezekiah Mix, Levi Hicks,
Adam Smith, Darius Barr, Reuben Collins, Harrison Logue, William
Dent, G. W. Huntley, Isaac Smith, William Wylie, Washington Mason,
William Miller. Driftwood—Col. J. S. Bates. C. Y. White, D. J.
McDonald. Levi Musser. J. B. Earl. R. Rothrock. Grove— R. M.
Williams, G. A. Barclay, Josiah Fink.
HISTORY OF CAMEKOX COUNTY. 865 Jacob Shafer,
Washington Bailey, J. W. Phillips. George Goss, John A. Wykoff, John
C. Logue, Isaac Ramage, Joseph M. Shafer, A. P. Floyd. The Cameron
County Agricnltiiral Society was incorporated November 19, 1881,
with G. A. Walker, Joel Shives, J. "B. Newton, Allen Russell, J. G.
Bryan and J. W. Cochran, trustees. They, with the following named,
were the stockholders: J. D. Logan, H. Edgcomb, R. P. Heilman, L. G.
Cook, Frank Shives, H. C. Olmsted, William Frane, A. A. McDonald,
C. C. Fav and B. W. Green. Centennial Association. — The county
organization, for the purpose of making arrangements for and
carrying out the celebration of the Centennial Fourth in 1876,
comprised: President : 'Ei. R. Mayo; vicp-jyresidents: Shippen — J.
S. W'iley. W. C. Clark, L. T. More, Benjamin Emery, Joseph Housler;
Portage— William L. Ensign, L. Lucore; Lumber — P. W. Whiting, D.
R. Nelson; Driftwood — Henry Cochran, Levi Musser: Gibson — John
Brooks, Hezekiah Mix, G. W. Huntley; Grove — Charles Barclay, Isaac
Ramage, R. M. Williams. Marshal, J. W. Phelps; assistant marshals,
L. Taggart, J. O. Brookbank, J. M. Shafer. Committee of
arrangements: Emporium — C. B. Gould, William Howard, G. A.
Walker. J. W. Cochran. S. S. Hacket, F. D. Leet, L. G. Cook, Samuel
Kirk; Shippen — W. C. Clark, Franklin Hausler, Charles Weller;
Lumber — Green Mayo, R. and J. Barrows, Milo Bull; Driftwood —
Col. Bates, Thomas Dougherty, Daniel McDonald; Gibson — M. J. B.
Brooks. James Wylie, Isaac Smith; Grove— Joseph Shafer, Josiah
Fink, Alonzo Bailey. Semi- Religious Societies. — The County
Temperance Convention was organized at Sterling, April 10, 1874,
with Levi Musser. president, and Thomas M. Lewis, secretary. The
delegates present wei'e Miss Frances Pinney, Rev. L. H. Schenck, L.
H. Chase, James Estes, William Herring, William Arnold, Rev. M. H.
Moyer, David Chapman, Mrs. Jinks, Ella Herrick, John Lane, A. R.
Smith, T. C. Page, Annie Page, Revs. A. E. Taylor, Washington Shaffer
and J. W'. Bell. The County Sabbath school Association was
organized in May, 1874, with L. Taggart, president; J. H. Cole,
secretary; Philip Smith, treasurer; L. Musser, H. C. "WhSner, Joseph
Shaffer, Sr., D. R. Nelson, D. Burlingame. J. C. Chandler and George
Metzger, vice-presidents. RAILHO.iDS. In August, 1850, Lemuel
Lucore sold to Cameron & Stanton the right of way for their railroad,
then built as far as Salt Spring run. Work on the Philadelphia & Erie
Railroad was commenced in 1859, but suspended for a time. In
January, 1862, the company entered into a contract with the
Pennsylvania Railroad Company to lease to the latter their partly-
constructed road from Erie to Sunbury for a term of 999 years,
subject to all incumbrances. The road was completed to Emporium
October 20, 1868, and opened throughout its entire length in 1864.
In December, 1881, the Philadelphia & Erie Railroad depot, above
the junction of Bennett's branch extension of the Allegheny Valley
Railroad, was moved to the junction, the last named company
agreeing to leave title of building in the Philadelphia & Erie
Company. The Buffalo, New York & Philadelphia Railroad was
completed to Emporium December 23, IS (2. The first rail was
placed in October, 1867, on the old Buffalo & Washington Railroad,
and completed to East Aurora January 23. 1868. Work was resumed
September 15, 1870, and the road was formally opened to
Emporium December 28, 1872, the borough entertaining the visitors.
J. F. Parsons purchased the first ticket, and received the first bill of
goods from Buffalo via this
»bb HISTORY OF CAMERON COUNTY. road. This end of the
road was called, in 18G6, " The Sinnemahoning Portage Railroad."
The historj' of the Low Grade Division of the Allegheny Valley
Railroad shows its completion from Driftwood to Red Bank in 1874. .
. .Lumber railroads riTn through several valleys, as noted in the
township sketches. CHAPTER VIII. SHIPPEN TOWNSHIP—
BOROUGH OF EMPORIUM. ShippenTownsiiip Boundary and Area—
Genkkal Topoorapiiv— Population AND Assessments — March
Elections, 1861— Pioneer Days and Homes— Lumber and Mills— Oil
Well, Coal Mining and Other Ventures—Internal Improvements—
Miscellaneous. BoRou
HISTORY OF CAMERON COUNTY. 867 Chadwick, Elihu
Chadwick, Elizabeth Cummings, John Chandler, Elihu Chandler,
Jonathan Colegrove, John Earl (the Cox heirs had sixteen acres
improved), Benjamin Freeman, Brewster Freeman (owner of saw-mill
and thirty-three acres improved) Samuel, Thomas and Joseph
Hollon, Abram Honsler (eleven acres). Joseph and Aden Honsler,
Stephen Lucore, Luther and Rufus Lucore, Lemuel Lucore, Robert,
Daniel, William, Henry Lewis and William Lewis, Jr.* (had forty acres
improved) and William Shields. David Crow (who had moved to
Keating township), Ira Smith and Sylvester Squier had no
improvements made on their lands. All the property, real and
personal, of the above named, was valued at §8,456. The March
elections of 1861 for Shippen township, resulted as follows: Justice
of the Peace: Philip Lewis, 70; Joseph Housler, 46; Franklin Cole, 81;
John Beers, 59. Constable: Morris Lewis, 71; S. Ross, 76.
Stqjervisor: William Lewis, 62; L. G. Cook, 85; Rob. Warner, 110.
Auditors: George Thayer, 111; H. T. Taggart, 115; W. B. Jenks, 114.
Election Inspectors: James Ingram, 10; D. Haas, 44. Assessors:
Richard Chadwick. 61 ; M. C. Lucore, 48. Assistant Assessors: H.
Havens, 98; William Pepper, 63; John Beers, 34. Clerk: J. M. Judd,
57; I. L. Craven, 43. Treasurer: C. C. Freeman, 65. School Directors:
S. S. Hacket, 69; H. Lewis, 120; N. P. Housler, 109; H. F. GifPord,
113; J. Morrison, 114; N. P. Minard, 111; J. W. Morton, 48. Ira Jenks
was judge, S. Stiles and Daniel Haas, inspectors, with C. H. Ives and
E. L. Bradley, clerks, of this first meeting. From the beginning of 1
876 to the close of 1882, no less a sum than $40,682. 1 1 was
expended on the forty or fifty miles of roads in Shippen township,
and a debt of $27,000 created. In this township the second series of
settlements was made. Indeed, F. J. Chadwick groups the
settlements together, and in his reply to John Brooks saj-s: ■■ The
phrase ' first settlers ' includes Squire Freeman, Squire Crow, Col.
Chadwick, Hiram Sizer, William Sterling. Joseph Ritchie. Joseph
Mason, James Wylie, Benjamin Brooks, William Barr, Daniel Miller,
James Mix, Hugh Coleman, James Shafer, William A. Wykoff, John
Ramage, and others whose names do not at this moment come to
my recollection. It is not disparaging to our forefathers to admit that
as a class they did not become wealthy, for individual energy was
insufficient to overcome the natural obstacles that hindered success,
but to represent them as a class of profane, drunken boors, with less
sense than the contemptible, disgusting savages, is worthy of a
sharp rebuke, and if that is the way the ' rubric mothers ' taught,
may goodness save us from any more of that kind of teachings."
John Brooks, speaking of the pioneers, says: " Occupying, as they
did, the remote outskirts of civilization, they were subjected to many
privations incident to this rugged section of country. Several of these
early immigrants had done efiicient service in the Revolutionary war,
and in the war of 1812. Almost all the vocations of the industrial
classes were represented, and all could aid in the work of
extemporizing a cabin for the accommodation of the recent
immigrant. Among these early pioneers there were but few who
professeil Christianity, practically; most of them, however, held some
theory of religion, mostly Baptist or Presbyterian in their views.
Profanity was the common spice of conversation, and God was, if
'not in all their thoughts,' in all their mouths, and invoked in
execrations and imprecations more frequently than by benedictions.
The use of whisky was general; used by clergymen and
868 HISTORY OF CAMERON COUNTY. at funerals, and upon
all occasions; some more recent immigrants kept no cow, but always
kept whisky in their houses, alleging that a barrel of whisky was of
more value in a family than a cow." Some of the descendants of the
early settlers yet have a remarkable prescience, and they
prognosticate seasons and storms, with great assurance. Their
prevision enables them to anticipate all the changes of the weather,
and they are remarkable for their generosity, essaying upon every
opportunity to gratuitously advise all who may hear their converse of
the future approaching vicissitudes, and mutations, that so much
concern the lunatics. Some consult the milt or spleen of the hog,
that organ situate in the left hypochondriuru, and which was
supposed by the ancients to be the seat of anger and melancholy;
and from this organ they augur the severity of the approaching
winter. Some would quench their tires to p;revent the generation of
salamandies. The shrunken sinews in the shoulders of a horse were
cured by placing some of the hair in augur holes, in some peculiar
places, at some peculiar lunation. Incised wounds also were more
readily healed by anointing the instrument that made the wound.
Blood was stayed, pain mitigated, and bots in horses cured by pow-
wowing, or reciting some cabalistic phrase. J. J. Chadwick, in his
sketch of the Mt^thodist Church, states: "About 1806, Joseph Ellicott
opened a road from Dunstown, opposite Big Island, on the
Susquehanna, to Ellicottsville, N. Y. Along its course, through the
valley of the Sinnemahoning, twenty or thirty families settled
previous to the general survey of the region, and as hunting was the
general amusement, every adult male had a rifle, and every family a
supply of hounds. In 1810 Cox, McMurtrie & Co. sent James Allen to
lay out their town of Rich Valley." Surveyor Adlum ran the lines here
years before, as related in the general history. John Chadwick' s
home, burned in September, 1884. was built, mainly, in 1822, being
the pioneer house of Rich Valley The forest lire of May. 188-4,
confined itself in this township to the destruction of standing timber,
fences, etc. Payne, Cochran & Co.'s mill, and Hubbard's mill, at
Cochran Station, were only saved by the greatest exertion.
Buckwalter'a mill, at Howard, had a narrow escape, while Judge
More's residence and barn and other buildmgs at that place were
several times on fire. In July, 1876, the seven-year-old son of Denis
Heher left home (Emporium) and lost his way. The people turned out
en masse to search for the little traveler, but, after two days, the
searchers returned unrewarded. Five days after the boy's
disappearance, John Norris started for the woods, determined to
make one more effort. On his way Norris overtook Peter Norton and
Ed Mills, and the three went together. They proceeded up what is
known as the Little George run, and when about a mile and a half
from Plank Road Hollow, through a thick growth of underbrush and
briars, Norris saw a place tramped down, and a number of little play-
houses, apparently recently made, and a short distance from there,
close by a log, under some bushes, the little fellow was discovered
asleep. Mr. Norris immediately took him in his arms, and hurried to
restore him to his frantic parents. He carried the boy fully three
miles, only stopping once to give the child some water, which the
little fellow piteously begged for. The news soon spread through the
town, and there was general rejoicing. The child said he went to the
place where found, the first night, and remained there during the
time he was in the woods. He found plenty of berries, but got no
water. He heard parties calling him, some of the party coming within
a few feet of him, yet he kept quiet, probably through fear. The poor
child was in a very weak condition, and probably would have been
unable to even pick berries after that day. on account of having no
water during the time he was lost.
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.
ebookfinal.com