You are previewing Beginning C# 5.0 Databases, Second Edition.
O'Reilly logo
Beginning C# 5.0 Databases, Second Edition

Book Description

Assuming only basic knowledge of C#, Beginning C# 5.0 Databases teaches all the fundamentals of database technology and database programming readers need to quickly become highly proficient database users and application developers.

A comprehensive tutorial on both SQL Server 2012 and Visual Studio 2012, Beginning C# 5.0 Databases explains and demonstrates various techniques and ways to build a database application using T-SQL and C#. Full of practical, detailed examples, it's been fully revised and updated for Winforms using C# 5.0 and Visual Studio 2012 and offers the most complete, detailed, and gentle introduction to database technology for all C# programmers at any level of experience.

  • Comprehensively and concisely explains fundamental database concepts and database programming techniques

  • Rich in step-by-step working examples of both T-SQL and C# programs

  • Covers all the features ADO.NET most database programming ever requires

  • Table of Contents

    1. Title
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. About the Author
    6. About the Technical Reviewer
    7. Acknowledgments
    8. Introduction
    9. Part I: Understanding Tools and Fundamentals Databases
      1. Chapter 1: Getting and Understanding Your Tools
        1. Obtaining Visual Studio 2012
        2. Installing SQL Server 2012 Express
        3. Installing and Attaching the AdventureWorks Sample Database
        4. Summary
      2. Chapter 2: Understanding Relational Databases
        1. What Is a Database?
        2. Choosing Between a Spreadsheet and a Database
        3. Why Use a Database?
        4. Benefits of Using a Relational Database Management System
        5. Comparing Desktop and Server RDBMS Systems
        6. The Database Life Cycle
        7. Mapping Cardinalities
        8. Understanding Keys
        9. Understanding Data Integrity
        10. Normalization Concepts
        11. Drawbacks of Normalization
        12. Summary
      3. Chapter 3: Creating Database and Tables
        1. Launching SQL Server Management Studio
        2. Types of SQL Server Databases
        3. The Architecture of a SQL Server Database
        4. Creating a Database in a Simple Way
        5. Exploring Database Properties
        6. Creating Database with Your Own Settings
        7. Summary
    10. Part II: Working with Database and XML
      1. Chapter 4: Manipulating Database Data
        1. Inserting Data
        2. Inserting Multiple Rows Through a Single INSERT Statement
        3. Updating Data
        4. Deleting Data
        5. Summary
      2. Chapter 5: Querying Databases
        1. Retrieving Data
        2. Sorting Data
        3. GROUP BY Clause
        4. Pattern Matching
        5. Aggregate Functions
        6. DATETIME Functions
        7. List Operator
        8. Range Operator
        9. Finding NULL Values
        10. Joins
        11. Summary
      3. Chapter 6: Using Stored Procedures
        1. Creating Stored Procedures
        2. Modifying Stored Procedures
        3. Displaying the Definition of Stored Procedures
        4. Renaming Stored Procedures
        5. Deleting Stored Procedures
        6. Summary
      4. Chapter 7: Using XML
        1. Defining XML
        2. Why XML
        3. Benefits of Storing Data As XML
        4. Understanding XML Documents
        5. Understanding the XML Declaration
        6. Converting Relational Data to XML
        7. Using the XML Datatype
        8. Summary
      5. Chapter 8: Understanding Transactions
        1. What Is a Transaction?
        2. Understanding ACID Properties
        3. Transaction State
        4. Summary
    11. Part III: Working with Data Using ADO.NET
      1. Chapter 9: Building Windows Forms Applications
        1. Understanding Windows Forms
        2. Setting the Properties of Solutions, Projects, and Windows Forms
        3. Setting Dock and Anchor Properties
        4. Summary
      2. Chapter 10: Introduction to ADO.NET
        1. Understanding ADO.NET
        2. Data Providers Are APIs
        3. Summary
      3. Chapter 11: Handling Exceptions
        1. The System.Exception Class
        2. What Causes an Exception to Occur
        3. Exploring the Type, Message, and StackTrace Properties of an Exception
        4. Handling Exceptions
        5. Summary
      4. Chapter 12: Making Connections
        1. Introducing the Data Provider Connection Classes
        2. Connecting to SQL Server 2012 with SqlConnection
        3. Improving Your Use of Connection Objects
        4. Connecting to SQL Server with OleDbConnection
        5. Summary
      5. Chapter 13: Executing ADO.NET Commands to Retrieve Data
        1. Creating a Command
        2. Executing Commands
        3. Try It: Using the ExecuteScalar Method
        4. Working with Stored Procedures
        5. Summary
      6. Chapter 14: Using Data Readers
        1. Understanding Data Readers in General
        2. Summary
    12. Part IV: Working with Advanced ADO.NET Related Features
      1. Chapter 15: Using Data Sets and Data Adapters
        1. Understanding the Object Model
        2. Working with Data Sets and Data Adapters
        3. Using Data Sets and XML
        4. Summary
      2. Chapter 16: Using Data Controls with ASP.NET Applications
        1. Understanding Web Functionality
        2. Understanding ASP.NET and Web Pages
        3. Understanding the Visual Studio 2012 Web Site Types
        4. Understanding the Layout of an ASP.NET Web Site
        5. Understanding the Web UI of ASP.NET Web Apps
        6. Using the Repeater Control
        7. Summary
      3. Chapter 17: Working with Text and Binary Data
        1. Understanding SQL Server Text and Binary Data Types
        2. Storing Images in a Database
        3. Summary
      4. Chapter 18: Using LINQ
        1. Introduction to LINQ
        2. Architecture of LINQ
        3. LINQ Project Structure
        4. Summary
      5. Chapter 19: Using the ADO.NET Entity Framework
        1. Understanding ADO.NET Entity Framework 5.0
        2. Understanding the Entity Data Model
        3. Summary
      6. Chapter 20: Using the CLR in SQL Server
        1. Introducing SQL CLR
        2. Choosing Between T-SQL and SQL CLR
        3. Enabling SQL CLR Integration
        4. Creating a SQL CLR Stored Procedure
        5. Deploying a SQL CLR Stored Procedure into SQL Server
        6. Executing the SQL CLR Stored Procedure
        7. Summary
    13. Index