- ホーム
- > 洋書
- > 英文書
- > Computer / Databases
Full Description
Master T-SQL database design, development, and administration the easy way-hands-on!In just one hour a day, you'll build all the skills you need to create effective database applications with T-SQL and SQL Server. With this complete tutorial, you'll quickly master the basics and then move on to more advanced features and concepts:Learn the fundamentals of T-SQL from the ground up, one step at a time Succeed with the newest versions of T-SQL, SQL Server, and SQL Server Management Studio Use T-SQL effectively as both an application developer and DBA Master powerful stored procedures, triggers, transactions, and user-defined functions (UDFs) Systematically optimize and secure your SQL Server databasesLearn on your own time, at your own paceNo previous T-SQL or database programming experience required Learn how to design efficient, reliable SQL Server databases Define efficient tables, table relationships, fields, and constraints Make the most of T-SQL's SELECT and UPDATE statements Work effectively with simple and complex views and joins Master stored procedure techniques every developer should know Build and use powerful User-Defined Functions (UDFs) Secure databases with authentication, roles, permissions, and principals Configure, maintain, and tune SQL Server for maximum reliability, performance, and value Back up, restore, and audit databases Optimize databases with the SQL Server Profiler, System Monitor, and Index Tuning Wizard Leverage valuable insight and time saving techniques from a world renowned database expertRegister your book at informit.com/register for access to source code, example files, updates, and corrections as they become available.
Contents
Introduction 11: Database Basics 5What Is a Database? 5What Is a Table? 5What Is a Database Diagram? 6What Is a View? 7What Is a Stored Procedure? 8What Is a User-Defined Function? 9What Is a Trigger? 102: SQL Server Basics 13Versions of SQL Server 2014 Available 13SQL Server Components 16Introduction to Microsoft SQL Server Management Studio 19Connecting to a Database Server 25Installing the Sample Files 273: Creating a SQL Server Database 33Creating the Database 33Defining Database Options 36The Transaction Log 39Attaching to an Existing Database 404: Working with SQL Server Tables 45Creating SQL Server Tables 45Adding Fields to the Tables You Create 46Working with Constraints 50Creating an Identity Specification 56Adding Computed Columns 57Working with User-Defined Data Types 58Adding and Modifying Indexes 60Saving Your Table 645: Working with Table Relationships 67An Introduction to Relationships 67Creating and Working with Database Diagrams 70Working with Table Relationships 77Designating Table and Column Specifications 79Adding a Relationship Name and Description 81Determining When Foreign Key Relationships Constrain theData Entered in a Column 81Designating Insert and Update Specifications 846: Getting to Know the SELECT Statement 89Introducing T-SQL 89Working with the SELECT Statement 90Adding on the FROM Clause 92Including the WHERE Clause 93Using the ORDER BY Clause 1017: Taking the SELECT Statement to the Next Level 105Adding the DISTINCT Keyword 105Working with the FOR XML Clause 107Working with the GROUP BY Clause 109Including Aggregate Functions in Your SQL Statements 110Taking Advantage of the HAVING Clause 117Creating Top Values Queries 1188: Building SQL Statements Based on Multiple Tables 121Working with Join Types 1219: Powerful Join Techniques 129Utilizing Full Joins 129Taking Advantage of Self-Joins 130Exploring the Power of Union Queries 133Working with Subqueries 136Using the INTERSECT Operator 137Working with the EXCEPT Operator 13810: Modifying Data with Action Queries 141The UPDATE Statement 141The INSERT Statement 143The SELECT INTO Statement 145The DELETE Statement 146The TRUNCATE Statement 14711: Getting to Know the T-SQL Functions 149Working with Numeric Functions 149Taking Advantage of String Functions 151Exploring the Date/Time Functions 163Working with Nulls 17012: Working with SQL Server Views 177An Introduction to Views 177Using T-SQL to Create or Modify a View 18513: Using T-SQL to Design SQL Server Stored Procedures 191The Basics of Working with Stored Procedures 192Declaring and Working with Variables 198Controlling the Flow 20014: Stored Procedure Techniques Every Developer Should Know 215The SET NOCOUNT Statement 215Using the @@ Functions 216Working with Parameters 221Errors and Error Handling 22715: Power Stored Procedure Techniques 233Modifying Data with Stored Procedures 233Stored Procedures and Transactions 23716: Stored Procedure Special Topics 243Stored Procedures and Temporary Tables 243Stored Procedures and Cursors 245Stored Procedures and Security 25017: Building and Working with User-Defined Functions 253Scalar Functions 25318: Creating and Working with Triggers 263Creating Triggers 263Creating an Insert Trigger 266Creating an Update Trigger 269Creating a Delete Trigger 272Downsides of Triggers 27419: Authentication 277The Basics of Security 277Types of Authentication 278Creating Logins 280Creating Roles 28520: SQL Server Permissions Validation 299Types of Permissions 299Getting to Know Table Permissions 309Getting to Know View Permissions 312Getting to Know Stored Procedure Permissions 314Getting to Know Function Permissions 315Implementing Column-Level Security 31521: Configuring, Maintaining, and Tuning SQL Server 321Selecting and Tuning Hardware 321Configuring and Tuning SQL Server 32422: Maintaining the Databases You Build 335Backing Up Your Databases 335Restoring a Database 338The Database Engine Tuning Advisor 341Creating and Working with Database Maintenance Plans 34423: Performance Monitoring 355Executing Queries in SQL Server Management Studio 355Displaying and Analyzing the Estimated Execution Plan 358Adding Indexes to Allow Queries to Execute More Efficiently 362Setting Query Options 364SQL Server Profiler 36724: Installing and Upgrading SQL Server 377Installing SQL Server 2014 Enterprise Edition 377Installing SQL Server Management Studio 385Index 389



