README updates

This commit is contained in:
anthonydb 2021-06-20 15:08:51 -04:00
parent e851dfc3e7
commit 924adb3072
3 changed files with 28 additions and 14 deletions

View File

@ -1,11 +1,11 @@
### SOFTWARE LICENSE ### SOFTWARE LICENSE
Copyright (c) 2018 Anthony DeBarros Copyright (c) 2021 Anthony DeBarros
Permission is hereby granted, free of charge, to any person obtaining a copy of this software, data, and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Permission is hereby granted, free of charge, to any person obtaining a copy of this software, data, and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
This license shall apply solely to the Software (including data and associated documentation) published at https://github.com/anthonydb/practical-sql/. To remove doubt, this license shall not apply to the surrounding and/or accompanying words, titles, images, graphics, charts, descriptions, tables, indexes, table of contents, and other non-Software matter included in the print and electronic versions of the book "Practical SQL: A Beginner's Guide to Storytelling with Data" (No Starch Press, 2018). This license shall apply solely to the Software (including data and associated documentation) published at https://github.com/anthonydb/practical-sql-2/. To remove doubt, this license shall not apply to the surrounding and/or accompanying words, titles, images, graphics, charts, descriptions, tables, indexes, table of contents, and other non-Software matter included in the print and electronic versions of the book "Practical SQL: A Beginner's Guide to Storytelling with Data" (No Starch Press, 2018).
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,28 +1,34 @@
# Practical SQL, 2nd Edition # Practical SQL, 2nd Edition
### A Beginner's Guide to Storytelling with Data ### A Beginner's Guide to Storytelling with Data
[Practical SQL, 2nd Edition](https://www.nostarch.com/practicalSQL2) is a beginner-friendly guide to the database programming language SQL. Journalist and data analyst [Anthony DeBarros](https://www.anthonydebarros.com) starts with SQL basics, using the free open-source database PostgreSQL and interface pgAdmin, and works through intermediate and advanced topics including statistics, aggregation, cleaning data, GIS and automating tasks. Along the way, you'll use real-world data from the U.S. Census and other government agencies and learn the fundamentals of good database design. This book is ideal for beginners as well as those who know some SQL and want to go deeper. [Practical SQL, 2nd Edition](https://www.nostarch.com/practicalSQL2) is a beginner-friendly guide to the database programming language SQL. Author [Anthony DeBarros](https://www.anthonydebarros.com) starts with beginner SQL concepts such as queries, data types, and basic math and aggregation, and then works through intermediate and advanced topics including statistics, cleaning data, GIS, and automating tasks. Along the way, you'll use real-world data from the U.S. Census and other government agencies and learn the fundamentals of good database design.
Practical SQL, 2nd Edition is [available in PDF, .mobi, .epub, and classic print formats](https://www.nostarch.com/practicalSQL2). ## A Note About Editions
If you're reading the first edition of the book, published in 2018, please [use the code and data in the first edition repository](https://github.com/anthonydb/practical-sql/). If the cover of your copy does not say, "2nd Edition," then you're using the first edition.
Questions? Please email [practicalsqlbook@gmail.com](mailto:practicalsqlbook@gmail.com). You can also open an issue in this repository. ## Who Is This Book For?
## Which Edition Are You Using? Practical SQL is ideal for beginners as well as those who know some SQL and want to go deeper.
The code and data presented here are for the 2nd Edition of Practical SQL, published in 20XX. If you're using the original edition of the book, please [use that repository for the appropriate resources](https://github.com/anthonydb/practical-sql/). If the cover of your copy does not say, "2nd Edition," then you're using the original edition.
## What's Here ## Which Database Does The Book Use?
We use [PostgreSQL](https://www.postgresql.org), which is free and open source. PostgreSQL is used by some of the world's largest companies. Its SQL syntax adheres closely to the ANSI SQL standard.
## What's In This Repository?
**Code**: All the SQL statements and command-line listings used in each chapter, organized by chapter folders. **Code**: All the SQL statements and command-line listings used in each chapter, organized by chapter folders.
**Data**: CSV and JSON files plus GIS shapefiles for you to import, also organized by chapter. **NOTE!** See the warning below about opening CSV files with Excel or text editors in the section on Getting the Code and Data. **Data**: CSV and JSON files plus GIS shapefiles for you to import, also organized by chapter. **NOTE!** See the warning below about opening CSV files with Excel or text editors in the section on Getting the Code and Data.
**Exercises**: The "Try It Yourself" questions and answers for each chapter, listed separately. Try working through the questions before peeking at the answers! **Exercises**: The "Try It Yourself" questions and answers for each chapter, listed separately. Try working through the questions before peeking at the answers.
**Software Installation Updates**: Over time, the instructions for installing PostgreSQL and additional components may change. You'll find updates noted at [software-installation-updates.md](https://github.com/anthonydb/practical-sql-2/blob/master/software-installation-updates.md).
**FAQ, Updates, and Errata**: Answers to frequently asked questions, updates, and corrections are noted at [faq-updates-errata.md](https://github.com/anthonydb/practical-sql-2/blob/master/faq-updates-errata.md). **FAQ, Updates, and Errata**: Answers to frequently asked questions, updates, and corrections are noted at [faq-updates-errata.md](https://github.com/anthonydb/practical-sql-2/blob/master/faq-updates-errata.md).
**Resources**: Updates to the book's Appendix on Additional PostgreSQL Resources at [resources.md](https://github.com/anthonydb/practical-sql-2/blob/master/resources.md). **Resources**: Updates to the book's Appendix on Additional PostgreSQL Resources at [resources.md](https://github.com/anthonydb/practical-sql-2/blob/master/resources.md).
## Chapters ## What's Covered in Each Chapter?
* Chapter 1: Setting Up Your Coding Environment * Chapter 1: Setting Up Your Coding Environment
* Chapter 2: Creating Your First Database and Table * Chapter 2: Creating Your First Database and Table
@ -46,7 +52,7 @@ The code and data presented here are for the 2nd Edition of Practical SQL, publi
* Chapter 20: Telling Your Data's Story * Chapter 20: Telling Your Data's Story
* Appendix: Additional PostgreSQL Resources * Appendix: Additional PostgreSQL Resources
## Getting the Code and Data on Your Computer ## How Do I Get the Code and Data?
**Non-GitHub Users** **Non-GitHub Users**
@ -57,8 +63,16 @@ You can obtain all the code and data at once by downloading this repository as a
* Unzip the file on your computer. Place it in a directory that's easy to remember so you can reference it during the exercises that include importing data to PostgreSQL. * Unzip the file on your computer. Place it in a directory that's easy to remember so you can reference it during the exercises that include importing data to PostgreSQL.
* For additional instructions, please read Chapter 1 in the book. * For additional instructions, please read Chapter 1 in the book.
**Warning about CSV files!**: Opening CSV files with Excel could lead to data loss. Excel will remove leading zeros from numbers that are intended to be stored as text, such as zip codes. If you wish to view the contents of a CSV file, only do so with a plain-text editor and be careful not to save the file in an encoding other than UTF-8 (e.g., `Notepad.exe` on Windows defaults to ANSI). **Warning about CSV files!**: Opening CSV files with Excel could lead to data loss. Excel will remove leading zeros from numbers that are intended to be stored as text, such as ZIP codes. To view the contents of a CSV file, only do so with a plain-text editor and be careful not to save the file in an encoding other than UTF-8.
**GitHub Users** **GitHub Users**
GitHub users may want to clone the repository locally and occasionally perform a `git pull` to receive any updates. GitHub users may want to clone the repository locally and occasionally perform a `git pull` to receive updates.
# Where Can I Buy the Book?
Practical SQL, 2nd Edition is [available in PDF, .mobi, .epub, and classic print formats](https://www.nostarch.com/practicalSQL2).
# How Can I Get Help?
Questions? Please email [practicalsqlbook@gmail.com](mailto:practicalsqlbook@gmail.com). You can also open an issue in this repository.

View File

@ -2,7 +2,7 @@
### FAQ, Updates, and Errata ### FAQ, Updates, and Errata
This page contains answers to Frequently Asked Questions, updates to material and URLs, and errata related Practical SQL, 2nd Edition. This page contains answers to Frequently Asked Questions, updates to material and URLs, and errata for Practical SQL, 2nd Edition.
### Introduction ### Introduction