Tables of Contents for Beginning Visual Basic .Net Databases
What Does This Book Cover?
2
1
What Do I Need to Use this Book?
2
1
How to Download the Sample Code for the Book4
1
Errata5
1
E-mail Support5
1
p2p.wrox.com6
3
Relational Database Design
9
30
Flat File Versus Relational Databases10
2
Determining Database Requirements
12
3
Analyzing Our Business Needs12
2
Determining the Information To Be Tracked14
1
Determining the Logical Database Design
15
21
Defining Tables (Entities) and Fields (Attributes)15
1
Identifying Tables and Fields15
5
Identifying Keys20
1
Primary Keys20
1
Foreign Keys21
2
Defining Relationships23
1
One-To-One Relationships23
1
One-To-Many Relationships24
1
Many-To-Many Relationships24
2
Referential Integrity26
1
Normalizing the Data26
1
First Normal Form27
5
Second Normal Form32
1
Third Normal Form33
1
When To Denormalize34
1
Defining Indexes34
2
Testing the Logical Database Design36
1
Implementing the Physical Database Design
36
1
Create, Test, and Refine36
1
Microsoft SQL Server 2000 Desktop Engine
39
38
The Microsoft SQL Server 2000 Desktop Engine
39
3
Microsoft SQL Server 2000 Defined40
1
Why Use Desktop Engine Instead of Access?41
1
Obtaining and Installing Desktop Engine
42
4
Where to Get a Copy of Desktop Engine43
1
Installation Requirements43
1
How To Install Desktop Engine43
1
Understanding What was Installed44
1
SQL Server Service44
1
SQL Server Agent44
1
Distributed Transaction Coordinator44
1
Managing the Services with SQL Server Service Manager44
2
Using Access to Work with Desktop Engine / SQL Server
46
27
Creating a New Desktop Engine / SQL Server Database from Microsoft Access47
18
Upsizing an Existing Access Database To SQL Server 2000 Desktop Engine65
8
Other Ways of Creating and Managing Desktop Engine Databases
73
1
Querying the Database
77
26
Querying SQL Server Desktop Engine Databases
77
23
Transact SQL (T-SQL) versus Jet SQL78
1
The Basics of T-SQL78
1
Selecting Data from the Database78
6
Filtering Data with WHERE84
6
Modifying Data with INSERT, UPDATE, and DELETE90
3
Beyond the Basics93
1
Sorting Data with ORDER BY and GROUP BY93
4
Retrieving Data from Multiple Tables Using JOINS97
1
Retrieving Distinct Data98
1
Using Subqueries99
1
Unions100
1
Exploring the Server Explorer
103
24
Managing SQL Server Databases Using Server Explorer
103
15
The Views Node103
4
The Stored Procedures Node107
3
The Tables Node110
6
The Database Diagrams Node116
2
The Functions Node118
1
Exploring the Rest of Server Explorer
118
6
SQL Server Databases Node118
1
SQL Server Instances Node119
3
Servers Node122
2
The Data Connections Node124
1
The User Interface for the Database
127
46
Creating a Simple Database Application
129
38
A Brief Introduction to ADO.NET130
1
The Data Source131
1
The Data Connection131
1
The DataAdapters132
1
The DataSet133
12
Building the Data Container145
3
Binding Data to Controls148
6
Displaying Database Information to the User154
1
Compiling and Running the Project154
2
What's Behind the Curtain?156
5
Adding Additional Tables161
6
Data Access with ADO.NET
173
64
A Short History of Data Access
174
4
Data Access Technologies175
3
Application Architectures
178
4
Client-Server178
2
3-Tier180
1
n-Tier181
1
ADO's Strengths and Weaknesses182
1
Comparisons to ADO184
1
ADO.NET Architecture184
1
The DataSet Object185
1
The DataTable Object186
1
The DataColumn Object187
2
The DataRow Object189
7
The DataRelation Object196
1
The Constraints Object197
2
Updating the Database199
3
DataSet Sample202
9
ADO.NET Namespaces211
2
The System.Data Namespace213
1
The System.Data.OleDb and System.Data.SqlClient Namespaces214
1
The System.Xml Namespace215
1
Dataflow in ADO.NET215
1
.NET Data Providers216
11
DataReader Sample Project227
8
Summary235
1
Questions235
2
Reading Data Into the DataSet
237
56
The Product Management System Overview
237
5
Creating the User Interface for the Search Screens
242
21
Creating the Base Search Form Project243
11
Inheriting from the Base Search Form254
4
Implementing the Unique Functionality of the Products Search Form258
3
Implementing the Unique Functionality of the Suppliers Search Form261
2
Using the DataSet to Retrieve Data
263
27
The DataSet Object263
1
Populating a DataSet from Multiple Tables and Relating Them to Each Other264
9
Populating a DataSet from a SQL Statement273
2
Building the SQL Statement Based on User Input275
15
Simple Versus Complex Data Binding
293
33
Binding the Results To the DataGrid294
3
Displaying the Search Results in the DataGrid297
5
Creating the Base Add/View/Edit Form302
11
Inheriting from the Base Data Form313
1
Implementing the Unique Functionality of the Add/View/Edit Products Form314
6
Implementing the Unique Functionality of the Add/View/Edit Suppliers Form320
2
Making the DataSets Accessible322
1
Ready to Roll323
3
Validating User Input
326
6
Other Data Considerations
332
6
Using DataViews to Filter and Sort Data332
3
Using the DataReader to Retrieve Single Rows335
3
Updating the DataSet and Handling Errors
341
40
Updating the Local Version of the DataSet
341
9
Modifying the Add/View/Edit Products and Suppliers Screens to Update the Local DataSet342
1
Adding a New Record to the Local DataSet342
2
Deleting a Record in the Local DataSet344
3
Modifying an Existing Record in the Local DataSet347
3
Saving the Changes to the Database
350
25
Handling Changed Records351
12
Handling Deleted Records363
4
Handling Added Records367
8
Testing the New Capabilities of Our Forms
375
3
Handling Data Update Conflicts
381
17
Handling Update Conflicts with Optimistic or Pessimistic Concurrency383
1
Implementing Optimistic Concurrency with DataSets384
1
Version Number or Timestamp Method384
12
The Saving All Values Method396
2
Transactions in Database Applications398
2
Product Management System Tour
400
4
Running a Complex Products Search400
1
Modifying Records Returned in the Search401
1
Adding a New Record402
2
Generate an Update Conflict404
1
Suppliers and Products411
9
Grid Layout vs. Flow Layout420
1
An Inventory Web Application
421
13
Searching for Products422
2
Improving Presentation of the DataGrid424
2
Adding a Unit Price Column426
1
Adding an InStock Column427
4
Paging431
3
Updating with Web Forms
434
15
Looking up Customers435
6
Saving Changes441
2
Adding Other Fields443
3
Validating Data446
2
Further Validation Controls448
1
A Sample XML Document452
3
Attributes455
1
Creating an XML Document
455
7
Saving DataSets as XML456
6
Loading and Saving XML Data
462
13
Schemas464
4
Checking the Validity of a Document468
2
Checking Validity470
5
Saving the DataSet478
1
Loading the DataSet Again479
2
Changing the XML Changes the DataSet481
1
Making Changes482
5
Nodes487
3
Changing the DataSet Changes the XML490
7
Simplifying Data Manipulation with Typed DataSets
497
2
Building a Web Service
504
23
Designing Our Web Service504
7
Finding the Code511
1
SOAP Namespaces511
1
Returning Shipping Details for an Order512
1
Returning Shipping Details513
3
Security Considerations516
1
The GetShippingDetails Method516
3
Building the GetShippingDetails Method519
8
Consuming a Web Service
527
11
Testing More Eventualities537
1
Logging Problems538
4
UDDI545
3
Web Service Brokerages548
1
SMS Messaging549
1
Registering for the Service549
2
Referencing the Web Service551
1
Sending Messages552
3
Disconnected Data Access
559
2
A Data Access Layer560
1
Building the Application
561
39
Retrieving Products565
2
The ``Provider'' Class567
2
The ConnectionMode and Connection Properties569
2
Returning Data571
7
Overriding the ToString Method578
1
Remote Connections579
5
Using the Remote Connection Mode584
2
Creating RemoteConnection586
1
A Slight Change to the Client587
2
Switching Modes589
1
Automatically Detecting the Connection Type590
7
Exception Handling597
3
Choosing Suppliers600
1
Building the ``ProviderGetSuppliers'' Stored Procedure600
1
Calling ``ProviderGetSuppliers''601
5
Changing the Selected Supplier606
5
Calling ``GetSuppliers'' from the Web Service611
1
Building ``SetProductDetails''613
3
Testing the Changes616
3
Saving Changes Over the Web Service619
2
Case Study - B2B Application Integration Using XML
623
58
Transferring the Document638
1
Web Service638
1
FTP638
1
E-mail639
1
Message Queuing639
1
Proprietary639
1
Receiving and Processing the Order
639
39
Creating the Service640
6
Responding to Order Requests646
8
Processing the Order654
14
Building the Windows Service668
4
Sending the Order via a Web Service672
6