Practical SQL 1st Edition Anthony Debarros
Visit to download the full and correct content document: https://textbookfull.com/product/practical-sql-1st-edition-anthony-debarros/
More products digital (pdf, epub, mobi) instant download maybe you interests ...
Practical SQL A Beginner s Guide to Storytelling with Data 1st Edition Anthony Debarros
https://textbookfull.com/product/practical-sql-a-beginner-sguide-to-storytelling-with-data-1st-edition-anthony-debarros/
Practical SQL A Beginner s Guide to Storytelling with Data 1st Edition Anthony Debarros
https://textbookfull.com/product/practical-sql-a-beginner-sguide-to-storytelling-with-data-1st-edition-anthony-debarros-2/
SQL Cookbook: Query Solutions and Techniques for All SQL Users 2nd Edition Anthony Molinaro
https://textbookfull.com/product/sql-cookbook-query-solutionsand-techniques-for-all-sql-users-2nd-edition-anthony-molinaro/
Practical guide to Oracle SQL, T-SQL and MySQL 1st Edition Preston Zhang
https://textbookfull.com/product/practical-guide-to-oracle-sql-tsql-and-mysql-1st-edition-preston-zhang/
Practical Maintenance Plans in SQL Server Automation for the DBA 1st Edition Bradley Beard
https://textbookfull.com/product/practical-maintenance-plans-insql-server-automation-for-the-dba-1st-edition-bradley-beard/
Mentalization Based Treatment for Personality Disorders: A Practical Guide 1st Edition Anthony Bateman
https://textbookfull.com/product/mentalization-based-treatmentfor-personality-disorders-a-practical-guide-1st-edition-anthonybateman/
Practical Maintenance Plans in SQL Server Automation for the DBA Beard
https://textbookfull.com/product/practical-maintenance-plans-insql-server-automation-for-the-dba-beard/
Mobile and Social Media Journalism A Practical Guide Anthony Adornato
https://textbookfull.com/product/mobile-and-social-mediajournalism-a-practical-guide-anthony-adornato/
Practical Azure SQL Database for Modern Developers: Building Applications in the Microsoft Cloud 1st Edition Davide Mauri
https://textbookfull.com/product/practical-azure-sql-databasefor-modern-developers-building-applications-in-the-microsoftcloud-1st-edition-davide-mauri/
PRACTICAL
SQL
A Beginner’s Guide to Storytelling with Data
by Anthony DeBarros
San Francisco
Estadísticos e-Books & Papers
PRACTICAL SQL. Copyright © 2018 by Anthony DeBarros.
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.
ISBN-10: 1-59327-827-6
ISBN-13: 978-1-59327-827-4
Publisher: William Pollock
Production Editor: Janelle Ludowise
Cover Illustration: Josh Ellingson
Interior Design: Octopod Studios
Developmental Editors: Liz Chadwick and Annie Choi
Technical Reviewer: Josh Berkus
Copyeditor: Anne Marie Walker
Compositor: Janelle Ludowise
Proofreader: James Fraleigh
For information on distribution, translations, or bulk sales, please contact No Starch Press, Inc.
directly: No Starch Press, Inc.
245 8th Street, San Francisco, CA 94103
phone: 1.415.863.9900; info@nostarch.com
www.nostarch.com
LibraryofCongressCataloging-in-PublicationData
Names: DeBarros, Anthony, author.
Title: Practical SQL : a beginner's guide to storytelling with data / Anthony DeBarros.
Description: San Francisco : No Starch Press, 2018. | Includes index.
Identifiers: LCCN 2018000030 (print) | LCCN 2017043947 (ebook) | ISBN 9781593278458 (epub) | ISBN 1593278454 (epub) | ISBN 9781593278274
(paperback) | ISBN 1593278276 (paperback) | ISBN 9781593278458 (ebook)
Subjects: LCSH: SQL (Computer program language) | Database design. | BISAC:
COMPUTERS / Programming Languages / SQL. | COMPUTERS / Database Management / General. | COMPUTERS / Database Management / Data Mining.
Classification: LCC QA76.73.S67 (print) | LCC QA76.73.S67 D44 2018 (ebook) |
DDC 005.75/6--dc23
LC record available at https://lccn.loc.gov/2018000030
No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc.
Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no Estadísticos e-Books & Papers intention of infringement of the trademark.
The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.
Estadísticos e-Books & Papers
About the Author
Anthony DeBarros is an award-winning journalist who has combined avid
interests in data analysis, coding, and storytelling for much of his career.
He spent more than 25 years with the Gannett company, including the PoughkeepsieJournal, USATODAY, and Gannett Digital. He is currently senior vice president for content and product development for a publishing and events firm and lives and works in the Washington, D.C., area.
Estadísticos e-Books & Papers
About the Technical Reviewer
Josh Berkus is a “hacker emeritus” for the PostgreSQL Project, where he served on the Core Team for 13 years. He was also a database consultant for 15 years, working with PostgreSQL, MySQL, CitusDB, Redis, CouchDB, Hadoop, and Microsoft SQL Server. Josh currently works as a Kubernetes community manager at Red Hat, Inc.
Estadísticos e-Books & Papers
BRIEF CONTENTS
Foreword by Sarah Frostenson
Acknowledgments
Introduction
Chapter 1: Creating Your First Database and Table
Chapter 2: Beginning Data Exploration with SELECT
Chapter 3: Understanding Data Types
Chapter 4: Importing and Exporting Data
Chapter 5: Basic Math and Stats with SQL
Chapter 6: Joining Tables in a Relational Database
Chapter 7: Table Design That Works for You
Chapter 8: Extracting Information by Grouping and Summarizing
Chapter 9: Inspecting and Modifying Data
Chapter 10: Statistical Functions in SQL
Chapter 11: Working with Dates and Times
Chapter 12: Advanced Query Techniques
Chapter 13: Mining Text to Find Meaningful Data
Chapter 14: Analyzing Spatial Data with PostGIS
Chapter 15: Saving Time with Views, Functions, and Triggers
Chapter 16: Using PostgreSQL from the Command Line
Chapter 17: Maintaining Your Database
Estadísticos e-Books & Papers
Chapter 18: Identifying and Telling the Story Behind Your Data
Appendix: Additional PostgreSQL Resources
Index
Estadísticos e-Books & Papers
CONTENTS IN DETAIL
FOREWORD by Sarah Frostenson
ACKNOWLEDGMENTS
INTRODUCTION
What Is SQL?
Why Use SQL? About This Book
Using the Book’s Code Examples
Using PostgreSQL
Installing PostgreSQL
Working with pgAdmin
Alternatives to pgAdmin
Wrapping Up
CREATING YOUR FIRST DATABASE AND TABLE
Creating a Database
Executing SQL in pgAdmin
Connecting to the Analysis Database
Creating a Table
The CREATE TABLE Statement
Making the teachers Table
Inserting Rows into a Table
The INSERT Statement
Viewing the Data When Code Goes Bad
Formatting SQL for Readability
Wrapping Up
Estadísticos e-Books & Papers
Try It Yourself
2
BEGINNING DATA EXPLORATION WITH SELECT
Basic SELECT Syntax
Querying a Subset of Columns
Using DISTINCT to Find Unique Values
Sorting Data with ORDER BY
Filtering Rows with WHERE
Using LIKE and ILIKE with WHERE
Combining Operators with AND and OR
Putting It All Together
Wrapping Up
Try It Yourself
3 UNDERSTANDING DATA TYPES
Characters
Numbers
Integers
Auto-Incrementing Integers
Decimal Numbers
Choosing Your Number Data Type
Dates and Times
Using the interval Data Type in Calculations
Miscellaneous Types
Transforming Values from One Type to Another with CAST
CAST Shortcut Notation
Try It Yourself
IMPORTING AND EXPORTING DATA
Estadísticos e-Books & Papers
Working with Delimited Text Files
Quoting Columns that Contain Delimiters
Handling Header Rows
Using COPY to Import Data
Importing Census Data Describing Counties
Creating the us_counties_2010 Table
Census Columns and Data Types
Performing the Census Import with COPY
Importing a Subset of Columns with COPY
Adding a Default Value to a Column During Import
Using COPY to Export Data
Exporting All Data
Exporting Particular Columns
Exporting Query Results
Importing and Exporting Through pgAdmin
Try It Yourself 5
BASIC MATH AND STATS WITH SQL
Math Operators
Math and Data Types
Adding, Subtracting, and Multiplying
Division and Modulo
Exponents, Roots, and Factorials
Minding the Order of Operations
Doing Math Across Census Table Columns
Adding and Subtracting Columns
Finding Percentages of the Whole
Tracking Percent Change
Aggregate Functions for Averages and Sums
Finding the Median
Estadísticos e-Books & Papers
Finding the Median with Percentile Functions
Median and Percentiles with Census Data
Finding Other Quantiles with Percentile Functions
Creating a median() Function
Finding the Mode
Wrapping Up
Try It Yourself
6
JOINING TABLES IN A RELATIONAL DATABASE
Linking Tables Using JOIN
Relating Tables with Key Columns
Querying Multiple Tables Using JOIN
JOIN Types
JOIN
LEFT JOIN and RIGHT JOIN
FULL OUTER JOIN
CROSS JOIN
Using NULL to Find Rows with Missing Values
Three Types of Table Relationships
One-to-One Relationship
One-to-Many Relationship
Many-to-Many Relationship
Selecting Specific Columns in a Join
Simplifying JOIN Syntax with Table Aliases
Joining Multiple Tables
Performing Math on Joined Table Columns
Wrapping Up
Try It Yourself
7
TABLE DESIGN THAT WORKS FOR YOU
Estadísticos e-Books & Papers
Naming Tables, Columns, and Other Identifiers
Using Quotes Around Identifiers to Enable Mixed Case
Pitfalls with Quoting Identifiers
Guidelines for Naming Identifiers
Controlling Column Values with Constraints
Primary Keys: Natural vs. Surrogate
Foreign Keys
Automatically Deleting Related Records with CASCADE
The CHECK Constraint
The UNIQUE Constraint
The NOT NULL Constraint
Removing Constraints or Adding Them Later
Speeding Up Queries with Indexes
B-Tree: PostgreSQL’s Default Index
Considerations When Using Indexes
Wrapping Up
Try It Yourself
8
EXTRACTING INFORMATION BY GROUPING AND
SUMMARIZING
Creating the Library Survey Tables
Creating the 2014 Library Data Table
Creating the 2009 Library Data Table
Exploring the Library Data Using Aggregate Functions
Counting Rows and Values Using count()
Finding Maximum and Minimum Values Using max() and min()
Aggregating Data Using GROUP BY
Wrapping Up
Try It Yourself
9
Estadísticos e-Books & Papers
INSPECTING AND MODIFYING DATA
Importing Data on Meat, Poultry, and Egg Producers
Interviewing the Data Set
Checking for Missing Values
Checking for Inconsistent Data Values
Checking for Malformed Values Using length()
Modifying Tables, Columns, and Data
Modifying Tables with ALTER TABLE
Modifying Values with UPDATE
Creating Backup Tables
Restoring Missing Column Values
Updating Values for Consistency
Repairing ZIP Codes Using Concatenation
Updating Values Across Tables
Deleting Unnecessary Data
Deleting Rows from a Table
Deleting a Column from a Table
Deleting a Table from a Database
Using Transaction Blocks to Save or Revert Changes
Improving Performance When Updating Large Tables
Wrapping Up
Try It Yourself
10
STATISTICAL FUNCTIONS IN SQL
Creating a Census Stats Table
Measuring Correlation with corr(Y, X)
Checking Additional Correlations
Predicting Values with Regression Analysis
Finding the Effect of an Independent Variable with r-squared
Creating Rankings with SQL
Ranking with rank() and dense_rank()
Estadísticos e-Books & Papers
Ranking Within Subgroups with PARTITION BY
Calculating Rates for Meaningful Comparisons
Wrapping Up Try It Yourself
11
WORKING WITH DATES AND TIMES
Data Types and Functions for Dates and Times
Manipulating Dates and Times
Extracting the Components of a timestamp Value
Creating Datetime Values from timestamp Components
Retrieving the Current Date and Time
Working with Time Zones
Finding Your Time Zone Setting
Setting the Time Zone
Calculations with Dates and Times
Finding Patterns in New York City Taxi Data
Finding Patterns in Amtrak Data
Wrapping Up
Try It Yourself
12
ADVANCED QUERY TECHNIQUES
Using Subqueries
Filtering with Subqueries in a WHERE Clause
Creating Derived Tables with Subqueries
Joining Derived Tables
Generating Columns with Subqueries
Subquery Expressions
Common Table Expressions
Cross Tabulations
Installing the crosstab() Function
Estadísticos e-Books & Papers
Tabulating Survey Results
Tabulating City Temperature Readings
Reclassifying Values with CASE
Using CASE in a Common Table Expression
Wrapping Up
Try It Yourself
13
MINING TEXT TO FIND MEANINGFUL DATA
Formatting Text Using String Functions
Case Formatting
Character Information
Removing Characters
Extracting and Replacing Characters
Matching Text Patterns with Regular Expressions
Regular Expression Notation
Turning Text to Data with Regular Expression Functions
Using Regular Expressions with WHERE
Additional Regular Expression Functions
Full Text Search in PostgreSQL
Text Search Data Types
Creating a Table for Full Text Search
Searching Speech Text
Ranking Query Matches by Relevance
Wrapping Up
Try It Yourself
14
ANALYZING SPATIAL DATA WITH POSTGIS
Installing PostGIS and Creating a Spatial Database
The Building Blocks of Spatial Data
Two-Dimensional Geometries
Estadísticos e-Books & Papers
Well-Known Text Formats
A Note on Coordinate Systems
Spatial Reference System Identifier
PostGIS Data Types
Creating Spatial Objects with PostGIS Functions
Creating a Geometry Type from Well-Known Text
Creating a Geography Type from Well-Known Text
Point Functions
LineString Functions
Polygon Functions
Analyzing Farmers’ Markets Data
Creating and Filling a Geography Column
Adding a GiST Index
Finding Geographies Within a Given Distance
Finding the Distance Between Geographies
Working with Census Shapefiles
Contents of a Shapefile
Loading Shapefiles via the GUI Tool
Exploring the Census 2010 Counties Shapefile
Performing Spatial Joins
Exploring Roads and Waterways Data
Joining the Census Roads and Water Tables
Finding the Location Where Objects Intersect
Wrapping Up
Try It Yourself
15
SAVING TIME WITH VIEWS, FUNCTIONS, AND TRIGGERS
Using Views to Simplify Queries
Creating and Querying Views
Inserting, Updating, and Deleting Data Using a View
Programming Your Own Functions
Estadísticos e-Books & Papers
Creating the percent_change() Function
Using the percent_change() Function
Updating Data with a Function
Using the Python Language in a Function
Automating Database Actions with Triggers
Logging Grade Updates to a Table
Automatically Classifying Temperatures
Wrapping Up
Try It Yourself
16
USING POSTGRESQL FROM THE COMMAND LINE
Setting Up the Command Line for psql
Windows psql Setup
macOS psql Setup
Linux psql Setup
Working with psql
Launching psql and Connecting to a Database
Getting Help
Changing the User and Database Connection
Running SQL Queries on psql
Navigating and Formatting Results
Meta-Commands for Database Information
Importing, Exporting, and Using Files
Additional Command Line Utilities to Expedite Tasks
Adding a Database with createdb
Loading Shapefiles with shp2pgsql
Wrapping Up
Try It Yourself
17
MAINTAINING YOUR DATABASE
Estadísticos e-Books & Papers
Recovering Unused Space with VACUUM
Tracking Table Size
Monitoring the autovacuum Process
Running VACUUM Manually
Reducing Table Size with VACUUM FULL
Changing Server Settings
Locating and Editing postgresql.conf
Reloading Settings with pg_ctl
Backing Up and Restoring Your Database
Using pg_dump to Back Up a Database or Table
Restoring a Database Backup with pg_restore
Additional Backup and Restore Options
Wrapping Up
Try It Yourself
18
IDENTIFYING AND TELLING THE STORY BEHIND YOUR DATA
Start with a Question
Document Your Process
Gather Your Data
No Data? Build Your Own Database
Assess the Data’s Origins
Interview the Data with Queries
Consult the Data’s Owner
Identify Key Indicators and Trends over Time
Ask Why
Communicate Your Findings
Wrapping Up
Try It Yourself
APPENDIX
Estadísticos e-Books & Papers
ADDITIONAL POSTGRESQL RESOURCES
PostgreSQL Development Environments
PostgreSQL Utilities, Tools, and Extensions
PostgreSQL News Documentation
INDEX
Estadísticos e-Books & Papers
FOREWORD
When people ask which programming language I learned first, I often absent-mindedly reply, “Python,” forgetting that it was actually with
SQL that I first learned to write code. This is probably because learning
SQL felt so intuitive after spending years running formulas in Excel
spreadsheets. I didn’t have a technical background, but I found SQL’s syntax, unlike that of many other programming languages, straightforward and easy to implement. For example, you run SELECT * on a SQL table to make every row and column appear. You simply use the JOIN keyword to return rows of data from different related tables, which you can then further group, sort, and analyze.
I’m a graphics editor, and I’ve worked as a developer and journalist at a number of publications, including POLITICO, Vox, and USATODAY.
My daily responsibilities involve analyzing data and creating visualizations from what I find. I first used SQL when I worked at TheChronicleof HigherEducationand its sister publication, TheChronicleof Philanthropy.
Our team analyzed data ranging from nonprofit financials to faculty salaries at colleges and universities. Many of our projects included as much as 20 years’ worth of data, and one of my main tasks was to import all that data into a SQL database and analyze it. I had to calculate the
percent change in fundraising dollars at a nonprofit or find the median
endowment size at a university to measure an institution’s performance.
I discovered SQL to be a powerful language, one that fundamentally shaped my understanding of what you can—and can’t—do with data. SQL excels at bringing order to messy, large data sets and helps you discover how different data sets are related. Plus, its queries and functions are easy to reuse within the same project or even in a different database.
This leads me to PracticalSQL. Looking back, I wish I’d read Chapter
Estadísticos e-Books & Papers
4 on “Importing and Exporting Data” so I could have understood the power of bulk imports instead of writing long, cumbersome INSERT statements when filling a table. The statistical capabilities of PostgreSQL, covered in Chapters 5 and 10 in this book, are also something I wish I had grasped earlier, as my data analysis often involves calculating the percent change or finding the average or median values. I’m embarrassed to say that I didn’t know how percentile_cont(), covered in Chapter 5, could be used to easily calculate a median in PostgresSQL with the added bonus that it also finds your data’s natural breaks or quantiles.
But at that stage in my career, I was only scratching the surface of SQL’s capabilities. It wasn’t until 2014, when I became a data developer at Gannett Digital on a team led by Anthony DeBarros, that I learned to use PostgreSQL. I began to understand just how enormously powerful SQL was for creating a reproducible and sustainable workflow. When I met Anthony, he had been working at USATODAYand other Gannett properties for more than 20 years, where he had led teams that built databases and published award-winning investigations. Anthony was able to show me the ins and outs of our team’s databases in addition to teaching me how to properly build and maintain my own. It was through working with Anthony that I truly learned how to code.
One of the first projects Anthony and I collaborated on was the 2014 U.S. midterm elections. We helped build an election forecast data visualization to show USATODAYreaders the latest polling averages, campaign finance data, and biographical information for more than 1,300 candidates in more than 500 congressional and gubernatorial races. Building our data infrastructure was a complex, multistep process
powered by a PostgreSQL database at its heart.
Anthony taught me how to write code that funneled all the data from our sources into a half-dozen tables in PostgreSQL. From there, we could query the data into a format that would power the maps, charts, and front-end presentation of our election forecast.
Around this time, I also learned one of my favorite things about PostgreSQL—its powerful suite of geographic functions (Chapter 14 in Estadísticos e-Books & Papers this book). By adding the PostGIS extension to the database, you can create spatial data that you can then export as GeoJSON or as a shapefile, a format that is easy to map. You can also perform complex spatial analysis, like calculating the distance between two points or finding the density of schools or, as Anthony shows in the chapter, all the farmers’ markets in a given radius.
It’s a skill I’ve used repeatedly in my career. For example, I used it to build a data set of lead exposure risk at the census-tract level while at Vox, which I consider one of my crowning PostGIS achievements. Using this database, I was able to create a data set of every U.S. Census tract and its corresponding lead exposure risk in a spatial format that could be easily
Another random document with no related content on Scribd:
secretary pro tem. A committee of ten upon permanent organization were appointed, and consisted of the following gentlemen: C. W. Moulton, William Perry Fogg, Cyrus Butler, J. Q. Howard, Mahlon Chance, M. I. Southard, David F. Harbaugh, Warren Higley, Calvin S. Brice, and Joseph Pool. When an adjourned meeting was held, on the 20th of the same month, additions were made to this foundation committee, in the persons of Messrs. Carson Lake, John W. Harman, and Homer Lee.
The committee were already prepared with a report. They had drafted a provisional constitution, and prepared by-laws, and proposed that these should be printed and sent to the Ohio men in New York, to discover how many would favor the movement, and agree to support it. Such action was ordered, the new fundamental law of a society not yet organized was sent broadcast, and responses invited. One hundred subscribing names were made the requisite; they were furnished, and twenty-five in addition. Thus encouraged, there was a call from the President, and on the evening of January 13, 1886, over one hundred of the sons of Ohio were found together in the parlors of the Fifth Avenue Hotel.
The meeting was prolific of results. The Ohio Society of New York, was called into being. Officers were elected; arrangements made for the preparation of a constitution that would be in exact accord with the purposes there declared. The first officers there chosen constituted a corps which was of itself a guarantee of successful results. General Thomas Ewing was elected president; Whitelaw Reid, General Wager Swayne, Col. William L. Strong, Hon. Hugh J. Jewett, and Algernon S. Sullivan were chosen vice-presidents. Homer Lee was made recording secretary and Carson Lake, corresponding secretary; while Col. William Perry Fogg was assigned to the responsible position of treasurer. A governing committee consisting of Henry L. Burnett, chairman, Calvin S. Brice, Andrew J. C. Foye, A. D. Juilliard, George Follett, Stephen B. Elkins, Jerome D. Gillett, C. W. Moulton, Joseph Pool, were selected. The president and vice-president were directed to prepare the constitution; the invitations of certain hotels managed by Ohio men to use their parlors for gatherings until permanent quarters could be
secured, were accepted; and the president-elect delivered a striking address upon assuming office, that throws so strong a light upon the purpose and spirit of the gathering, that the writer is tempted to quote somewhat freely therefrom.
“We have met to-night” said General Ewing, “as sons and foster sons of Ohio resident in New York City to complete the foundation of a new society in our National Metropolis. Full as this city is of organizations of men, she has, I think, none such as this. The ties of religion, charity, politics, science, art, literature and common occupation draw and hold people together in numberless associations which have filled Manhattan Island with splendid edifices. So, too, the sympathies of a common race and history have founded Societies of St. Patrick, St. Andrew, St. George and many others, at whose annual reunion, the wit, song and sentiment of the fatherlands warm the hearts of their sons in this land beyond the sea. And here, also, is an American society which has at several crises in the last fifty years exerted a considerable influence on public opinion, and the annual reunions of which are watched with eagerness everywhere throughout our land where the sons of New England, from their distant homes, look proudly and fondly back on their grand old mother.
“But the New England Society is composed of the sons of six States. This is a society of the natives or former residents of a single State—Ohio, the State first born of the American Republic. I do not say she was the first received into the Union, for Vermont, Kentucky and Tennessee all preceded her. Vermont was admitted in 1791, Kentucky in ’92, Tennessee in ’96 and Ohio not until the 29th day of November, 1802. But these three older States begun life as Colonies of Colonies, each exclusively owned by and settled from its parent colony—Vermont from New York, Kentucky from Virginia, and Tennessee from North Carolina. ‘The territory northwest of the Ohio river’ was the first land ever owned by the United States. It was a vast and pathless wilderness—an Empire in embryo—when, in 1784, Virginia, with magnificent generosity, presented it to the Union. It was not until ten years later, when the savages, who had been allies of Great Britain throughout the War of the Revolution, were routed and
subdued by Mad Anthony Wayne, that agricultural settlements, except under the shadow of block-houses, first became possible. Then the veteran soldiers of the Revolution, broken in fortune, but aflame with the love of liberty and triumphant from the long struggle for independence, flocked there from every one of the glorious thirteen; hewed out homes in the primeval forest, paid for lands in the long-dishonored certificates of indebtedness given for their service in the Revolutionary War, and thus founded the first State which sprung from the womb of the Republic.
“We are proud of Ohio,” continued the General, “for her heroic birth, her honorable achievements, and her glorious destiny. She ‘sits in the centre,’ belongs to no section, and is a bond of all. Her sons who meet here to-night are at home in New York. We do not come together as strangers in a strange land to seek relief from the depression of inhospitable influence. No; New York is not inhospitable. She is merely too big and too busy to note who comes or goes. Her gates landward and seaward, are thrown open to the world. She is a focus of all the great forces of American life. Much that is best and worst in it is developed here; and the struggle of a new comer for a footing is always severe, and generally unsuccessful. But New York is more truly cosmopolitan than any other city in the United States, or, perhaps, in the world; and there is little of race or sectional prejudice to bar the path of merit from whatever quarter it may come.
“We found this Society because we love Ohio, and would cherish her history, her traditions, her recollections of home and camp and forum. How often do we look back to the days and scenes of our life there to revive the sweetest influence and the dearest memories of existence.
“But we have aims for our Society beyond the culture of the memories and affections of other days. We hope to make it felt in this great field of thought and action as a generator of wholesome intellectual and moral forces. When this meeting was called for permanent organization there were one hundred and fifteen signers of our Constitution. Under the direction of a judicious Governing Committee, the number will doubtless be increased to several
hundred. Our membership of non-residents will perhaps be equally large. We should make something more of such good and abundant material than a mere social club. I am far from insensible to the pleasures of convivial reunions, and hope our society may have many of them, and that I may long be of the number present. But we can have some good work out of it as well as plenty of recreation. For instance, with the aid of our western and southwestern brethern, who, like ourselves, have drifted into this fence corner of the Republic, we might help it to throw off its colonial subserviency to English politics and manners, and gradually Americanize it. We can thus repay in kind the debt of gratitude we owe the East for its missionary efforts a generation ago, when it was the seat of power in the Union, and the now imperial West was but a half subdued wilderness.
“Ere long we can command means, I hope, to fit up and maintain an accessible, commodious and permanent club house, the halls of which will be a pleasant rendezvous for members and their friends, where the ideas and policies of East and West may meet in intelligent and friendly encounter, and where sectional prejudice may be worn off in the attrition of social intercourse; where we may see files of the Ohio newspapers, and note the current of life at our old homes; where our brethern who come East may meet, or learn where to find their friends, and get information and help in their business; where Ohio men and women who are eminent or rising in any worthy field of effort may have cordial recognition and a helping hand, if needed; and where those who have unfortunately fallen in the struggle for a foothold here will not be forgotten. In conclusion, gentlemen, I venture to express the hope that our Society may be from the outset, and continue to the end, so aristocratic that wealth can not buy a membership for vice, and so democratic that none will be excluded by needless cost of membership from an association which their virtues and talents would adorn.”
The foundation was thus laid; the story of the superstructure will be deferred for the present.