Learning SQL

 
 
O'Reilly Media (Verlag)
  • 1. Auflage
  • |
  • erschienen am 27. Mai 2014
  • |
  • 338 Seiten
 
E-Book | ePUB mit Adobe DRM | Systemvoraussetzungen
978-0-596-55558-0 (ISBN)
 
Updated for the latest database management systems -- including MySQL 6.0, Oracle 11g, and Microsoft's SQL Server 2008 -- this introductory guide will get you up and running with SQL quickly. Whether you need to write database applications, perform administrative tasks, or generate reports, Learning SQL, Second Edition, will help you easily master all the SQL fundamentals.Each chapter presents a self-contained lesson on a key SQL concept or technique, with numerous illustrations and annotated examples. Exercises at the end of each chapter let you practice the skills you learn. With this book, you will:Move quickly through SQL basics and learn several advanced featuresUse SQL data statements to generate, manipulate, and retrieve dataCreate database objects, such as tables, indexes, and constraints, using SQL schema statementsLearn how data sets interact with queries, and understand the importance of subqueriesConvert and manipulate data with SQL's built-in functions, and use conditional logic in data statementsKnowledge of SQL is a must for interacting with data. With Learning SQL, you'll quickly learn how to put the power and flexibility of this language to work.
  • Englisch
  • Sebastopol
  • |
  • USA
  • Ausgabe mit Anmerkungen
  • Windows
illustrations
978-0-596-55558-0 (9780596555580)
059655558X (059655558X)
weitere Ausgaben werden ermittelt
  • Learning SQL
  • SPECIAL OFFER: Upgrade this ebook with O'Reilly
  • A Note Regarding Supplemental Files
  • Preface
  • Why Learn SQL?
  • Why Use This Book to Do It?
  • Structure of This Book
  • Conventions Used in This Book
  • How to Contact Us
  • Using Code Examples
  • Safari® Books Online
  • Acknowledgments
  • 1. A Little Background
  • Introduction to Databases
  • Nonrelational Database Systems
  • The Relational Model
  • Some Terminology
  • What Is SQL?
  • SQL Statement Classes
  • SQL: A Nonprocedural Language
  • SQL Examples
  • What Is MySQL?
  • What's in Store
  • 2. Creating and Populating a Database
  • Creating a MySQL Database
  • Using the mysql Command-Line Tool
  • MySQL Data Types
  • Character Data
  • Character sets
  • Text data
  • Numeric Data
  • Temporal Data
  • Table Creation
  • Step 1: Design
  • Step 2: Refinement
  • Step 3: Building SQL Schema Statements
  • Populating and Modifying Tables
  • Inserting Data
  • Generating numeric key data
  • The insert statement
  • Updating Data
  • Deleting Data
  • When Good Statements Go Bad
  • Nonunique Primary Key
  • Nonexistent Foreign Key
  • Column Value Violations
  • Invalid Date Conversions
  • The Bank Schema
  • 3. Query Primer
  • Query Mechanics
  • Query Clauses
  • The select Clause
  • Column Aliases
  • Removing Duplicates
  • The from Clause
  • Tables
  • Subquery-generated tables
  • Views
  • Table Links
  • Defining Table Aliases
  • The where Clause
  • The group by and having Clauses
  • The order by Clause
  • Ascending Versus Descending Sort Order
  • Sorting via Expressions
  • Sorting via Numeric Placeholders
  • Test Your Knowledge
  • Exercise 3-1
  • Exercise 3-2
  • Exercise 3-3
  • Exercise 3-4
  • 4. Filtering
  • Condition Evaluation
  • Using Parentheses
  • Using the not Operator
  • Building a Condition
  • Condition Types
  • Equality Conditions
  • Inequality conditions
  • Data modification using equality conditions
  • Range Conditions
  • The between operator
  • String ranges
  • Membership Conditions
  • Using subqueries
  • Using not in
  • Matching Conditions
  • Using wildcards
  • Using regular expressions
  • Null: That Four-Letter Word
  • Test Your Knowledge
  • Exercise 4-1
  • Exercise 4-2
  • Exercise 4-3
  • Exercise 4-4
  • 5. Querying Multiple Tables
  • What Is a Join?
  • Cartesian Product
  • Inner Joins
  • The ANSI Join Syntax
  • Joining Three or More Tables
  • Using Subqueries As Tables
  • Using the Same Table Twice
  • Self-Joins
  • Equi-Joins Versus Non-Equi-Joins
  • Join Conditions Versus Filter Conditions
  • Test Your Knowledge
  • Exercise 5-1
  • Exercise 5-2
  • Exercise 5-3
  • 6. Working with Sets
  • Set Theory Primer
  • Set Theory in Practice
  • Set Operators
  • The union Operator
  • The intersect Operator
  • The except Operator
  • Set Operation Rules
  • Sorting Compound Query Results
  • Set Operation Precedence
  • Test Your Knowledge
  • Exercise 6-1
  • Exercise 6-2
  • Exercise 6-3
  • 7. Data Generation, Conversion, and Manipulation
  • Working with String Data
  • String Generation
  • Including single quotes
  • Including special characters
  • String Manipulation
  • String functions that return numbers
  • String functions that return strings
  • Working with Numeric Data
  • Performing Arithmetic Functions
  • Controlling Number Precision
  • Handling Signed Data
  • Working with Temporal Data
  • Dealing with Time Zones
  • Generating Temporal Data
  • String representations of temporal data
  • String-to-date conversions
  • Functions for generating dates
  • Manipulating Temporal Data
  • Temporal functions that return dates
  • Temporal functions that return strings
  • Temporal functions that return numbers
  • Conversion Functions
  • Test Your Knowledge
  • Exercise 7-1
  • Exercise 7-2
  • Exercise 7-3
  • 8. Grouping and Aggregates
  • Grouping Concepts
  • Aggregate Functions
  • Implicit Versus Explicit Groups
  • Counting Distinct Values
  • Using Expressions
  • How Nulls Are Handled
  • Generating Groups
  • Single-Column Grouping
  • Multicolumn Grouping
  • Grouping via Expressions
  • Generating Rollups
  • Group Filter Conditions
  • Test Your Knowledge
  • Exercise 8-1
  • Exercise 8-2
  • Exercise 8-3
  • Exercise 8-4 (Extra Credit)
  • 9. Subqueries
  • What Is a Subquery?
  • Subquery Types
  • Noncorrelated Subqueries
  • Multiple-Row, Single-Column Subqueries
  • The in and not in operators
  • The all operator
  • The any operator
  • Multicolumn Subqueries
  • Correlated Subqueries
  • The exists Operator
  • Data Manipulation Using Correlated Subqueries
  • When to Use Subqueries
  • Subqueries As Data Sources
  • Data fabrication
  • Task-oriented subqueries
  • Subqueries in Filter Conditions
  • Subqueries As Expression Generators
  • Subquery Wrap-up
  • Test Your Knowledge
  • Exercise 9-1
  • Exercise 9-2
  • Exercise 9-3
  • Exercise 9-4
  • 10. Joins Revisited
  • Outer Joins
  • Left Versus Right Outer Joins
  • Three-Way Outer Joins
  • Self Outer Joins
  • Cross Joins
  • Natural Joins
  • Test Your Knowledge
  • Exercise 10-1
  • Exercise 10-2
  • Exercise 10-3
  • Exercise 10-4 (Extra Credit)
  • 11. Conditional Logic
  • What Is Conditional Logic?
  • The Case Expression
  • Searched Case Expressions
  • Simple Case Expressions
  • Case Expression Examples
  • Result Set Transformations
  • Selective Aggregation
  • Checking for Existence
  • Division-by-Zero Errors
  • Conditional Updates
  • Handling Null Values
  • Test Your Knowledge
  • Exercise 11-1
  • Exercise 11-2
  • 12. Transactions
  • Multiuser Databases
  • Locking
  • Lock Granularities
  • What Is a Transaction?
  • Starting a Transaction
  • Ending a Transaction
  • Transaction Savepoints
  • Test Your Knowledge
  • Exercise 12-1
  • 13. Indexes and Constraints
  • Indexes
  • Index Creation
  • Unique indexes
  • Multicolumn indexes
  • Types of Indexes
  • B-tree indexes
  • Bitmap indexes
  • Text indexes
  • How Indexes Are Used
  • The Downside of Indexes
  • Constraints
  • Constraint Creation
  • Constraints and Indexes
  • Cascading Constraints
  • Test Your Knowledge
  • Exercise 13-1
  • Exercise 13-2
  • 14. Views
  • What Are Views?
  • Why Use Views?
  • Data Security
  • Data Aggregation
  • Hiding Complexity
  • Joining Partitioned Data
  • Updatable Views
  • Updating Simple Views
  • Updating Complex Views
  • Test Your Knowledge
  • Exercise 14-1
  • Exercise 14-2
  • 15. Metadata
  • Data About Data
  • Information_Schema
  • Working with Metadata
  • Schema Generation Scripts
  • Deployment Verification
  • Dynamic SQL Generation
  • Test Your Knowledge
  • Exercise 15-1
  • Exercise 15-2
  • A. ER Diagram for Example Database
  • B. MySQL Extensions to the SQL Language
  • Extensions to the select Statement
  • The limit Clause
  • Combining the limit clause with the order by clause
  • The limit clause's optional second parameter
  • Ranking queries
  • The into outfile Clause
  • Combination Insert/Update Statements
  • Ordered Updates and Deletes
  • Multitable Updates and Deletes
  • C. Solutions to Exercises
  • Chapter 3
  • 3-1
  • 3-2
  • 3-3
  • 3-4
  • Chapter 4
  • 4-1
  • 4-2
  • 4-3
  • 4-4
  • Chapter 5
  • 5-1
  • 5-2
  • 5-3
  • Chapter 6
  • 6-1
  • 6-2
  • 6-3
  • Chapter 7
  • 7-1
  • 7-2
  • 7-3
  • Chapter 8
  • 8-1
  • 8-2
  • 8-3
  • 8-4 (Extra Credit)
  • Chapter 9
  • 9-1
  • 9-2
  • 9-3
  • 9-4
  • Chapter 10
  • 10-1
  • 10-2
  • 10-3
  • 10-4 (Extra Credit)
  • Chapter 11
  • 11-1
  • 11-2
  • Chapter 12
  • 12-1
  • Chapter 13
  • 13-1
  • 13-2
  • Chapter 14
  • 14-1
  • 14-2
  • Chapter 15
  • 15-1
  • 15-2
  • Index
  • About the Author
  • Colophon
  • SPECIAL OFFER: Upgrade this ebook with O'Reilly
  • Copyright

Dateiformat: EPUB
Kopierschutz: Adobe-DRM (Digital Rights Management)

Systemvoraussetzungen:

Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat EPUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Weitere Informationen finden Sie in unserer E-Book Hilfe.


Download (sofort verfügbar)

57,39 €
inkl. 19% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe DRM
siehe Systemvoraussetzungen
E-Book bestellen

Unsere Web-Seiten verwenden Cookies. Mit der Nutzung des WebShops erklären Sie sich damit einverstanden. Mehr Informationen finden Sie in unserem Datenschutzhinweis. Ok