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

  • ポイントキャンペーン

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

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

Full Description


Includes Coverage of Oracle and Microsoft SQL ImplementationsIn just 24 lessons of one hour or less, Sams Teach Yourself SQL in 24 Hours, Sixth Edition, helps you use SQL to build effective databases, efficiently retrieve data, and manage everything from performance to security. This book's straightforward, step-by-step approach shows you how to work with database structures, objects, queries, tables, and more. In just hours, you will be applying advanced techniques, including views, transactions, web connections, and powerful Oracle and SQL Server extensions. Every lesson builds on what you've already learned, giving you a rock-solid foundation for real-world success.Step-by-step instructions carefully walk you through the most common SQL tasks.Practical, hands-on examples show you how to apply what you learn.Quizzes and exercises help you test your knowledge and stretch your skills.Notes and tips point out shortcuts and solutions.Learn how to...* Define efficient database structures and objects* "Normalize" raw databases into logically organized tables* Edit relational data and tables with DML* Manage 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* Secure databases and protect data* Use views, synonyms, and the system catalog* Extend SQL to the enterprise and Internet* Master important Oracle and Microsoft extensions to ANSI SQLRegister your product at informit.com/register for convenient access to downloads, updates, and corrections as they become available.

Contents

PART IHour 1: Welcome to the World of SQL 1SQL Definition and History 1SQL Sessions 8Types of SQL Commands 8Canary Airlines: The Database Used in This Book 11Summary 15Q&A 16Workshop 16PART II: BUILDING YOUR DATABASEHour 2: Defining Data Structures 19What Is Data? 19Basic Data Types 20Summary 28Q&A 29Workshop 29Hour 3: Managing Database Objects 33Database Objects and Schema 33Tables: The Primary Storage for Data 35Integrity Constraints 44Summary 49Q&A 50Workshop 50Hour 4: The Normalization Process 55Normalizing a Database 55Denormalizing a Database 63Summary 64Q&A 64Workshop 64Hour 5: Manipulating Data 67Overview of Data Manipulation 67Populating Tables with New Data 68Updating Existing Data 73Deleting Data from Tables 75Summary 76Q&A 77Workshop 77Hour 6: Managing Database Transactions 81What Is a Transaction? 81Controlling Transactions 82Poor Transactional Control 90Summary 90Q&A 90Workshop 91PART III: GETTING EFFECTIVE RESULTS FROM QUERIESHour 7: Introduction to Database Queries 93The SELECT Statement 93Case-Sensitivity 101Fundamentals of Query Writing 102Summary 106Q&A 106Workshop 107Hour 8: Using Operators to Categorize Data 109What Is an Operator in SQL? 109Comparison Operators 110Logical Operators 113Conjunctive Operators 120Negative Operators 123Arithmetic Operators 128Summary 130Q&A 131Workshop 131Hour 9: Summarizing Data Results from a Query 133Aggregate Functions 133Summary 141Q&A 142Workshop 142Hour 10: Sorting and Grouping Data 145Why Group Data? 145The GROUP BY Clause 146GROUP BY Versus ORDER BY 150CUBE and ROLLUP Expressions 153The HAVING Clause 155Summary 156Q&A 157Workshop 157Hour 11: Restructuring the Appearance of Data 159ANSI Character Functions 159Common Character Functions 160Miscellaneous Character Functions 169Mathematical Functions 172Conversion Functions 173Combining Character Functions 176Summary 177Q&A 177Workshop 178Hour 12: Understanding Dates and Times 181How Is a Date Stored? 181Date Functions 183Date Conversions 188Summary 193Q&A 194Workshop 194PART IV: BUILDING SOPHISTICATED DATABASE QUERIESHour 13: Joining Tables in Queries 197Selecting Data from Multiple Tables 197Understanding Joins 198Join Considerations 207Summary 210Q&A 210Workshop 211Hour 14: Using Subqueries to Define Unknown Data 213What Is a Subquery? 213Embedded Subqueries 219Correlated Subqueries 223Subquery Performance 225Summary 225Q&A 226Workshop 226Hour 15: Combining Multiple Queries into One 229Single Queries Versus Compound Queries 229Compound Query Operators 230Using ORDER BY with a Compound Query 235Using GROUP BY with a Compound Query 237Retrieving Accurate Data 238Summary 239Q&A 239Workshop 240PART V: SQL PERFORMANCE TUNINGHour 16: Using Indexes to Improve Performance 243What Is an Index? 243How Do Indexes Work? 244The CREATE INDEX Command 245Types of Indexes 245When Should Indexes Be Considered? 248When Should Indexes Be Avoided? 248Altering an Index 250Dropping an Index 250Summary 251Q&A 251Workshop 252Hour 17: Improving Database Performance 253What Is SQL Statement Tuning? 253Database Tuning Versus SQL Statement Tuning 254Formatting Your SQL Statement 254Full Table Scans 260Other Performance Considerations 261Cost-Based Optimization 264Summary 266Q&A 266Workshop 266Hour 18: Managing Database Users 269User Management in the Database 269The Management Process 272Tools Utilized by Database Users 279Summary 279Q&A 280Workshop 280Hour 19: Managing Database Security 283What Is Database Security? 283What Are Privileges? 284Controlling User Access 287Controlling Privileges Through Roles 291Summary 293Q&A 293Workshop 294PART VII: SUMMARIZED DATA STRUCTURESHour 20: Creating and Using Views and Synonyms 297What Is a View? 297Creating Views 300Updating Data Through a View 307Dropping a View 307Performance Impact of Nested Views 308What Is a Synonym? 308Summary 310Q&A 310Workshop 311Hour 21: Working with the System Catalog 313What Is the System Catalog? 313How Is the System Catalog Created? 314What Is Contained in the System Catalog? 315System Catalog Tables by Implementation 316Querying the System Catalog 317Updating System Catalog Objects 320Summary 320Q&A 321Workshop 321Hour 22: Advanced SQL Topics 323Cursors 323Stored Procedures and Functions 326Triggers 329Dynamic SQL 331Call-Level Interface 331Using SQL to Generate SQL 332Direct Versus Embedded SQL 333Windowed Table Functions 333Working with XML 334Summary 335Q&A 335Workshop 336Hour 23: Extending SQL to the Enterprise, the Internet, and the Intranet 337SQL and the Enterprise 337Accessing a Remote Database 339SQL and the Internet 342SQL and the Intranet 343Summary 344Q&A 344Workshop 344Hour 24: Extensions to Standard SQL 347Various Implementations 347Example Extensions 350Interactive SQL Statements 353Summary 354Q&A 354Workshop 355PART IX: APPENDIXESAppendix A: Common SQL Commands 357SQL Statements 357SQL Clauses 360Appendix B: Installing Oracle and Microsoft SQL 363Windows Installation Instructions for Oracle 363Windows Installation Instructions for Microsoft SQL Server 365Appendix C: Answers to Quizzes and Exercises 369Hour 1, "Welcome to the World of SQL" 369Hour 2, "Defining Data Structures" 371Hour 3, "Managing Database Objects" 373Hour 4, "The Normalization Process" 374Hour 5, "Manipulating Data" 376Hour 6, "Managing Database Transactions" 379Hour 7, "Introduction to the Database Queries" 380Hour 8, "Using Operators to Categorize Data" 383Hour 9, "Summarizing Data Results from a Query" 386Hour 10, "Sorting and Grouping Data" 388Hour 11, "Restructuring the Appearance of Data" 390Hour 12, "Understanding Dates and Times" 391Hour 13, "Joining Tables in Queries" 392Hour 14, "Using Subqueries to Define Unknown Data" 394Hour 15, "Combining Multiple Queries into One" 396Hour 16, "Using Indexes to Improve Performance" 397Hour 17, "Improving Database Performance" 399Hour 18, "Managing Database Users" 403Hour 19, "Managing Database Security" 404Hour 20, "Creating and Using Views and Synonyms" 404Hour 21, "Working with the System Catalog" 406Hour 22, "Advanced SQL Topics" 407Hour 23, "Extending SQL to the Enterprise, the Internet, and the Intranet" 408Hour 24, "Extensions to Standard SQL" 409Appendix D: Bonus Exercises 411Appendix E: Glossary 425Index 429