3rd Edition. — John Wiley & Sons, 2019. — 816 p. — ISBN: 1119569613.
The latest on SQL databases
SQL All -In-One For Dummies, 3rd Edition, is a one-stop shop for everything you need to know about SQL and SQL-based relational databases. Everyone from database administrators to application programmers and the people who manage them will find clear, concise explanations of the SQL language and its many powerful applications.
With the ballooning amount of data out there, more and more businesses, large and small, are moving from spreadsheets to SQL databases like Access, Microsoft SQL Server, Oracle databases, MySQL, and PostgreSQL. This compendium of information covers designing, developing, and maintaining these databases.
About This BookFoolish Assumptions
Conventions Used in This Book
What You Don’t Have to Read
How This Book Is Organized
Icons Used in This Book
Where to Go from Here
SQL ConceptsUnderstanding Relational DatabasesUnderstanding Why Today’s Databases Are Better than Early Databases
Databases, Queries, and Database Applications
Examining Competing Database Models
Why the Relational Model Won
Modeling a SystemCapturing the Users’ Data Model
Translating the Users’ Data Model to a Formal Entity-Relationship Model
Getting to Know SQLWhere SQL Came From
Knowing What SQL Does
The ISO/IEC SQL Standard
Knowing What SQL Does Not Do
Choosing and Using an Available DBMS Implementation
SQL and the Relational ModelSets, Relations, Multisets, and Tables
Functional Dependencies
Keys
Views
Users
Privileges
Schemas
Catalogs
Connections, Sessions, and Transactions
Routines
Paths
Knowing the Major Components of SQLCreating a Database with the Data Definition Language
Operating on Data with the Data Manipulation Language (DML)
Maintaining Security in the Data Control Language (DCL)
Drilling Down to the SQL Nitty-GrittyExecuting SQL Statements
Using Reserved Words Correctly
SQL’s Data Types
Handling Null Values
Applying Constraints
Relational Database DevelopmentSystem Development OverviewThe Components of a Database System
The System Development Life Cycle
Building a Database ModelFinding and Listening to Interested Parties
Building Consensus
Building a Relational Model
Being Aware of the Danger of Anomalies
The Database Integrity versus Performance Tradeoff
Balancing Performance and CorrectnessDesigning a Sample Database
Maintaining Integrity
Avoiding Data Corruption
Speeding Data Retrievals
Working with Indexes
Reading SQL Server Execution Plans
Creating a Database with SQLFirst Things First: Planning Your Database
Building Tables
Setting Constraints
Keys and Indexes
Ensuring Data Validity with Domains
Establishing Relationships between Tables
Altering Table Structure
Deleting Tables
SQL QueriesValues, Variables, Functions, andExpressions
Entering Data Values
Working with Functions
Using Expressions
SELECT Statements and Modifying ClausesFinding Needles in Haystacks with the SELECT Statement
Modifying Clauses
Tuning Queries
Querying Multiple Tables with SubqueriesWhat Is a Subquery?
What Subqueries Do
Using Subqueries in INSERT, DELETE, and UPDATE Statements
Tuning Considerations for Statements Containing Nested Queries
Tuning Correlated Subqueries
Querying Multiple Tables with RelationalOperators
UNION
INTERSECT
EXCEPT
JOINS
ON versus WHERE
Join Conditions and Clustering Indexes
CursorsDeclaring a Cursor
Opening a Cursor
Operating on a Single Row
Closing a Cursor
Data SecurityProtecting Against Hardware Failure andExternal Threats
What Could Possibly Go Wrong?
Taking Advantage of RAID
Backing Up Your System
Coping with Internet Threats
Installing Layers of Protection
Protecting Against User Errors and ConflictsReducing Data-Entry Errors
Coping with Errors in Database Design
Handling Programming Errors
Solving Concurrent-Operation Conflicts
Passing the ACID Test: Atomicity, Consistency, Isolation, and Durability
Operating with Transactions
Getting Familiar with Locking
Tuning Locks
Enforcing Serializability with Timestamps
Tuning the Recovery System
Assigning Access PrivilegesWorking with the SQL Data Control Language
Identifying Authorized Users
Classifying Users
Granting Privileges
Revoking Privileges
Granting Roles
Revoking Roles
Error HandlingIdentifying Error Conditions
Getting to Know SQLSTATE
Handling Conditions
Dealing with Execution Exceptions: The WHENEVER Clause
Getting More Information: The Diagnostics Area
Examining an Example Constraint Violation
Adding Constraints to an Existing Table
Interpreting SQLSTATE Information
Handling Exceptions
SQL and ProgrammingDatabase Development EnvironmentsMicrosoft Access
Microsoft SQL Server
IBM Db2
Oracle 18c
SQL Anywhere
PostgreSQL
MySQL
Interfacing SQL to a Procedural LanguageBuilding an Application with SQL and a Procedural Language
Using SQL in an Application ProgramComparing SQL with Procedural Languages
Difficulties in Combining SQL with a Procedural Language
Embedding SQL in an Application
Using SQL Modules with an Application
Designing a Sample ApplicationUnderstanding the Client’s Problem
Approaching the Problem
Determining the Deliverables
Building an Entity-Relationship Model
Transforming the Model
Creating Tables
Changing Table Structure
Removing Tables
Designing the User Interface
Building an ApplicationDesigning from the Top Down
Coding from the Bottom Up
Testing, Testing, Testing
Understanding SQL’s Procedural CapabilitiesEmbedding SQL Statements in Your Code
Introducing Compound Statements
Following the Flow of Control Statements
Using Stored Procedures
Working with Triggers
Using Stored Functions
Passing Out Privileges
Using Stored Modules
Connecting SQL to a Remote DatabaseNative Drivers
ODBC and Its Major Components
What Happens When the Application Makes a Request
SQL, XML, and JSONUsing XML with SQLIntroducing XML
Knowing the Parts of an XML Document
Using XML Schema
Relating SQL to XML
Using the XML Data Type
Mapping SQL to XML
Operating on XML Data with SQL Functions
Working with XML Predicates
Storing XML Data in SQL TablesInserting XML Data into an SQL Pseudotable
Creating a Table to Hold XML Data
Updating XML Documents
Discovering Oracle’s Tools for Updating XML Data in a Table
Introducing Microsoft’s Tools for Updating XML Data in a Table
Retrieving Data from XML DocumentsXQuery
FLWOR Expressions
XQuery versus SQL
Using JSON with SQLUsing JSON with SQL
The SQL/JSON Data Model
SQL/JSON Functions
SQL/JSON Path Language
Database Tuning OverviewTuning the DatabaseAnalyzing the Workload
Considering the Physical Design
Choosing the Right Indexes
Tuning Indexes
Tuning Queries
Tuning Transactions
Separating User Interactions from Transactions
Minimizing Traffic between Application and Server
Precompiling Frequently Used Queries
Tuning the EnvironmentSurviving Failures with Minimum Data Loss
Tuning the Recovery System
Tuning the Operating System
Maximizing the Hardware You Have
Adding Hardware
Working in Multiprocessor Environments
Finding and Eliminating BottlenecksPinpointing the Problem
Determining the Possible Causes of Trouble
Implementing General Principles: A First Step Toward Improving
Performance
Tracking Down Bottlenecks
Analyzing Query Efficiency
Managing Resources Wisely
SQL: 2016 Reserved Words
Advertisement Page
Connect with Dummies
End User License Agreement