Sams Teach Yourself SQL in 24 Hours (Sams Teach Yourself in 24 Hours) (5TH)

Sams Teach Yourself SQL in 24 Hours (Sams Teach Yourself in 24 Hours) (5TH)

  • Sams(2011/05発売)
  • ただいまウェブストアではご注文を受け付けておりません。 ⇒古書を探す
  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 473 p.
  • 言語 ENG
  • 商品コード 9780672335419
  • DDC分類 005.7565

Full Description


In just 24 sessions of one hour or less, you'll learn how to use SQL to build effective databases, efficiently retrieve your data, and manage everything from performance to security! Using this book's straightforward, step-by-step approach, you'll learn hands-on through practical examples. Each lesson builds on what you've already learned, giving you a strong real-world foundation for success. The authors guide you from the absolute basics to advanced techniques-including views, transactions, Web data publishing, and even powerful SQL extensions for Oracle and Microsoft SQL Server! Step-by-step instructions carefully walk you through the most common SQL tasks. Quizzes and Exercises at the end of each chapter help you test your knowledge. By the Way notes present interesting information related to the discussion. Did You Know? tips offer advice or show you easier ways to perform tasks. Watch Out! cautions alert you to possible problems and give you advice on how to avoid them. Learn how to...*Understand what SQL is, how it works, and what it does * Define efficient database structures and objects *"Normalize" raw databases into logically organized tables * Edit relational data and tables with DML * Manage database transactions * Write effective, well-performing queries * Categorize, summarize, sort, group, and restructure data * Work with dates and times * Join tables in queries, use subqueries, and combine multiple queries * Master powerful query optimization techniques * Administer databases and manage users * Implement effective database security * Use views, synonyms, and the system catalog * Extend SQL to the enterprise and Internet * Master important Oracle and Microsoft SQL Server extensions to ANSI SQL

Table of Contents

  Part I An SQL Concepts Overview
Hour 1 Welcome to the World of SQL 1 (20)
SQL Definition and History 1 (7)
SQL Sessions 8 (1)
Types of SQL Commands 9 (3)
The Database Used in This Book 12 (5)
Summary 17 (1)
Q&A 17 (1)
Workshop 18 (3)
Part II Building Your Database
Hour 2 Defining Data Structures 21 (16)
What Is Data? 21 (1)
Basic Data Types 22 (9)
Summary 31 (1)
Q&A 31 (1)
Workshop 32 (5)
Hour 3 Managing Database Objects 37 (24)
What Are Database Objects? 37 (1)
What Is a Schema? 37 (2)
Tables: The Primary Storage for Data 39 (10)
Integrity Constraints 49 (5)
Summary 54 (1)
Q&A 55 (1)
Workshop 55 (6)
Hour 4 The Normalization Process 61 (12)
Normalizing a Database 61 (8)
Denormalizing a Database 69 (1)
Summary 70 (1)
Q&A 70 (1)
Workshop 71 (2)
Hour 5 Manipulating Data 73 (14)
Overview of Data Manipulation 73 (1)
Populating Tables with New Data 74 (6)
Updating Existing Data 80 (2)
Deleting Data from Tables 82 (1)
Summary 83 (1)
Q&A 83 (1)
Workshop 84 (3)
Hour 6 Managing Database Transactions 87 (12)
What Is a Transaction? 87 (1)
Controlling Transactions 88 (7)
Transactional Control and Database 95 (1)
Performance
Summary 96 (1)
Q&A 96 (1)
Workshop 97 (2)
Part III Getting Effective Results from
Queries
Hour 7 Introduction to the Database Query 99 (16)
What Is a Query? 99 (1)
Introduction to the SELECT Statement 99 (9)
Examples of Simple Queries 108(4)
Summary 112(1)
Q&A 112(1)
Workshop 113(2)
Hour 8 Using Operators to Categorize Data 115(26)
What Is an Operator in SQL? 115(1)
Comparison Operators 116(3)
Logical Operators 119(7)
Conjunctive Operators 126(3)
Negative Operators 129(4)
Arithmetic Operators 133(3)
Summary 136(1)
Q&A 137(1)
Workshop 137(4)
Hour 9 Summarizing Data Results from a Query 141(12)
What Are Aggregate Functions? 141(9)
Summary 150(1)
Q&A 150(1)
Workshop 150(3)
Hour 10 Sorting and Grouping Data 153(16)
Why Group Data? 153(1)
The Group BY Clause 154(5)
Group By Versus Order BY 159(2)
Cube And Rollup Expressions 161(3)
The Having Clause 164(1)
Summary 165(1)
Q&A 166(1)
Workshop 166(3)
Hour 11 Restructuring the Appearance of Data 169(22)
ANSI Character Functions 169(1)
Common Character Functions 170(9)
Miscellaneous Character Functions 179(4)
Mathematical Functions 183(1)
Conversion Functions 183(3)
Combining Character Functions 186(1)
Summary 187(1)
Q&A 188(1)
Workshop 188(3)
Hour 12 Understanding Dates and Times 191(16)
How Is a Date Stored? 191(2)
Date Functions 193(5)
Date Conversions 198(6)
Summary 204(1)
Q&A 204(1)
Workshop 205(2)
Part IV Building Sophisticated Database
Queries
Hour 13 Joining Tables in Queries 207(18)
Selecting Data from Multiple Tables 207(1)
Understanding Joins 208(9)
Join Considerations 217(4)
Summary 221(1)
Q&A 222(1)
Workshop 222(3)
Hour 14 Using Subqueries to Define Unknown 225(14)
Data
What Is a Subquery? 225(6)
Embedded Subqueries 231(2)
Correlated Subqueries 233(1)
Subquery Performance 234(1)
Summary 235(1)
Q&A 235(1)
Workshop 236(3)
Hour 15 Combining Multiple Queries into One 239(16)
Single Queries Versus Compound Queries 239(1)
Compound Query Operators 240(6)
Using ORDER BY with a Compound Query 246(2)
Using GROUP BY with a Compound Query 248(2)
Retrieving Accurate Data 250(1)
Summary 250(1)
Q&A 250(1)
Workshop 251(4)
Part V SQL Performance Tuning
Hour 16 Using Indexes to Improve Performance 255(12)
What Is an Index? 255(1)
How Do Indexes Work? 256(1)
The Create Index Command 257(10)
Types of Indexes 258(2)
When Should Indexes Be Considered? 260(1)
When Should Indexes Be Avoided? 261(2)
Altering an Index 263(1)
Dropping an Index 263(1)
Summary 264(1)
Q&A 264(1)
Workshop 265(2)
Hour 17 Improving Database Performance 267(18)
What Is SQL Statement Tuning? 267(1)
Database Tuning Versus SQL Statement 268(1)
Tuning
Formatting Your SQL Statement 268(6)
Full Table Scans 274(1)
Other Performance Considerations 275(4)
Cost-Based Optimization 279(1)
Performance Tools 280(1)
Summary 280(1)
Q&A 281(1)
Workshop 281(4)
Part VI Using SQL to Manage Users and Security
Hour 18 Managing Database Users 285(14)
User Management in the Database 285(3)
The Management Process 288(8)
Tools Utilized by Database Users 296(1)
Summary 296(1)
Q&A 297(1)
Workshop 297(2)
Hour 19 Managing Database Security 299(14)
What Is Database Security? 299(2)
What Are Privileges? 301(3)
Controlling User Access 304(4)
Controlling Privileges Through Roles 308(2)
Summary 310(1)
Q&A 310(1)
Workshop 311(2)
Part VII Summarized Data Structures
Hour 20 Creating and Using Views and 313(16)
Synonyms
What Is a View? 313(3)
Creating Views 316(4)
With Check Option 320(1)
Creating a Table from a View 321(1)
Views and the ORDER BY Clause 322(1)
Updating Data Through a View 322(1)
Dropping a View 323(1)
Performance Impact of Using Nested Views 323(1)
What Is a Synonym? 324(1)
Summary 325(1)
Q&A 326(1)
Workshop 326(3)
Hour 21 Working with the System Catalog 329(10)
What Is the System Catalog? 329(2)
How Is the System Catalog Created? 331(1)
What Is Contained in the System Catalog? 331(2)
System Catalog Tables by Implementation 333(1)
Querying the System Catalog 334(2)
Updating System Catalog Objects 336(1)
Summary 337(1)
Q&A 337(1)
Workshop 338(1)
Part VIII Applying SQL Fundamentals in
Today's World
Hour 22 Advanced SQL Topics 339(16)
Cursors 339(4)
Stored Procedures and Functions 343(3)
Triggers 346(2)
Dynamic SQL 348(1)
Call-Level Interface 349(1)
Using SQL to Generate SQL 350(1)
Direct Versus Embedded SQL 351(1)
Windowed Table Functions 351(1)
Working with XML 352(1)
Summary 353(1)
Q&A 353(1)
Workshop 354(1)
Hour 23 Extending SQL to the Enterprise, 355(12)
the Internet, and the Intranet
SQL and the Enterprise 355(2)
Accessing a Remote Database 357(3)
SQL and the Internet 360(1)
SQL and the Intranet 361(1)
Summary 362(1)
Q&A 363(1)
Workshop 363(4)
Hour 24 Extensions to Standard SQL 367(10)
Various Implementations 367(3)
Example Extensions 370(3)
Interactive SQL Statements 373(1)
Summary 374(1)
Q&A 375(1)
Workshop 375(2)
Part IX Appendixes
APPENDIX A Common SQL Commands 377(6)
SQL Statements 377(4)
SQL Clauses 381(2)
APPENDIX B Using the Databases for Exercises 383(8)
Windows Installation Instructions for 383(3)
MySQL
Windows Installation Instructions for 386(2)
Oracle
Windows Installation Instructions for 388(3)
Microsoft SQL Server
APPENDIX C Answers to Quizzes and Exercises 391(48)
APPENDIX D CREATE TABLE Statements for Book 439(4)
Examples
APPENDIX E INSERT Statements for Data in Book 443(8)
Examples
APPENDIX F Glossary 451(4)
APPENDIX G Bonus Exercises 455(6)
Index 461