30.07.2013 Views

Visual Basic.NET How to Program (PDF)

Visual Basic.NET How to Program (PDF)

Visual Basic.NET How to Program (PDF)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

888 Database, SQL and ADO .<strong>NET</strong> Chapter 19<br />

Outline<br />

19.1 Introduction<br />

19.2 Relational Database Model<br />

19.3 Relational Database Overview: Books Database<br />

19.4 Structured Query Language (SQL)<br />

19.4.1 <strong>Basic</strong> SELECT Query<br />

19.4.2 WHERE Clause<br />

19.4.3 ORDER BY Clause<br />

19.4.4 Merging Data from Multiple Tables: INNER JOIN<br />

19.4.5 Joining Data from Tables Authors, AuthorISBN,<br />

Titles and Publishers<br />

19.4.6 INSERT Statement<br />

19.4.7 UPDATE Statement<br />

19.4.8 DELETE Statement<br />

19.5 ADO .<strong>NET</strong> Object Model<br />

19.6 <strong>Program</strong>ming with ADO .<strong>NET</strong>: Extracting Information from a DBMS<br />

19.6.1 Connecting <strong>to</strong> and Querying an Access Data Source<br />

19.6.2 Querying the Books Database<br />

19.7 <strong>Program</strong>ming with ADO .<strong>NET</strong>: Modifying a DBMS<br />

19.8 Reading and Writing XML Files<br />

Summary Terminology Self-Review Exercises Answers <strong>to</strong> Self-Review Exercises Exercises<br />

Bibliography<br />

19.1 Introduction<br />

A database is an integrated collection of data. Many different strategies exist for organizing<br />

data in databases <strong>to</strong> facilitate easy access <strong>to</strong> and manipulation of the data. A database management<br />

system (DBMS) provides mechanisms for s<strong>to</strong>ring and organizing data in a manner<br />

that is consistent with the database’s format. Database management systems enable programmers<br />

<strong>to</strong> access and s<strong>to</strong>re data without worrying about the internal representation of databases.<br />

Today’s most popular database systems are relational databases. Almost universally,<br />

relational databases use a language called Structured Query Language (SQL—pronounced<br />

as its individual letters or as “sequel”) <strong>to</strong> perform queries (i.e., <strong>to</strong> request information that<br />

satisfies given criteria) and <strong>to</strong> manipulate data. [Note: The writing in this chapter assumes<br />

that SQL is pronounced as its individual letters. For this reason, we often precede SQL with<br />

the article “an” as in “an SQL database” or “an SQL statement.”]<br />

Some popular, enterprise-level relational database systems include Microsoft SQL<br />

Server, Oracle, Sybase, DB2, Informix and MySQL. This chapter presents examples<br />

using Microsoft Access—a relational database system that comes with Microsoft Office.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!