Chapter 20. Database, SQL and ADO.NET


It is a capital mistake to theorize before one has data.

Arthur Conan Doyle

Now go, write it before them in a table, and note it in a book, that it may be for the time to come for ever and ever.

Holy Bible, Isaiah 30:8

Get your facts first, and then you can distort them as much as you please.

Mark Twain

I like two kinds of men: domestic and foreign.

Mae West

Objectives

In this chapter you will learn:

  • The relational database model.

  • To write basic database queries in SQL.

  • To add data sources to projects.

  • To use the IDE's drag-and-drop capabilities to display database tables in applications.

  • To use the classes of namespaces System.Data and System.Data.SqlClient to manipulate databases.

  • To use ADO.NET's disconnected object model to store data from a database in local memory.

  • To create XML documents from data sources.

Outline

20.1 Introduction

20.2 Relational Databases

20.3 Relational Database Overview: Books Database

20.4 SQL

20.4.1 Basic SELECT Query

20.4.2 WHERE Clause

20.4.3 ORDER BY Clause

20.4.4 Merging Data from Multiple Tables: INNER JOIN

20.4.5 INSERT Statement

20.4.6 UPDATE Statement

20.4.7 DELETE Statement

20.5 ADO.NET Object Model

20.6 Programming with ADO.NET: Extracting Information from a Database

20.6.1 Displaying a Database Table in a DataGridView

20.6.2 How Data Binding Works

20.7 Querying the Books Database

20.8 Programming with ADO.NET: Address Book Case Study

20.9 Using a DataSet to Read and Write XML

20.10 Wrap-Up

20.11 Web Resources



Visual BasicR 2005 for Programmers. DeitelR Developer Series
Visual Basic 2005 for Programmers (2nd Edition)
ISBN: 013225140X
EAN: 2147483647
Year: 2004
Pages: 435

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net