You are on page 1of 10

Developing Web-Enabled Decision Support Systems

Using Access, VB .NET, and ASP .NET

Abhijit A. Pol
Computer and Information Science and Engineering University of Florida, Gainesville

Ravindra K. Ahuja
Industrial and Systems Engineering University of Florida, Gainesville and Innovative Scheduling, Inc., Gainesville

Dynamic Ideas Belmont, Massachusetts

Contents
PREFACE xv

PART ONE

Principles of Good Database Design


Introduction
Introduction Defining a Decision Support System Web-enabled Decision Support Systems Decision Support System Applications Textbook Overview Summary Exercises 1.1 1.2 1.3 1.4 1.5 1.6 1.7

1
3
4 5 7 7 9 11 12

CHAPTER 1

CHAPTER 2
2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8

Introduction to Databases
Introduction Data, Information, and Metadata File-Based Approach Database Approach Database Development Process Data Models Summary Exercises

13
14 15 16 18 23 25 28 29

CHAPTER 3
3.1 3.2 3.3 3.4

Entity-Relationship Modeling
Introduction The Entity-Relationship Model Entity Attributes

33
34 34 35 36 v

vi

Contents

3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15 3.16 3.17 3.18 3.19 3.20 3.21 3.22

Relationships Degree of a Relationship Cardinality of a Relationship Unary Relationship Binary Relationship Ternary Relationships Attributes of Relationships Associative Entities Weak Entity Types Enhanced Entity-Relationship Modeling Superclass, Subclass, and Relationships Generalization and Specialization Process Participation and Disjoint Constraints Superclass/Subclass Hierarchy Case Study: Conceptual Design for University Database In-Class Assignment Summary Exercises

39 40 41 44 46 49 51 52 54 55 56 60 63 66 68 69 69 70

CHAPTER 4
4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 4.13 4.14

Relational Data Modeling and Normalization


Introduction The Relational Data Model Relational Keys Relational Data Integrity Constraints Transforming E-R Diagrams into Relational Schemas Case Study: Logical Design for a University Database Introduction to Normalization Data Redundancy Database Anomalies Functional Dependencies Forms of Normalization In-Class Assignment Summary Exercises

83
84 84 86 89 91 108 108 111 111 113 116 122 122 123

PART TWO

Database Development with Microsoft Access


Access Introduction: Touring Access
Introduction The Architecture of Microsoft Access Accesss Development Environment Exploring Tables Relationships Exploring Queries 5.1 5.2 5.3 5.4 5.5 5.6

133
135
136 136 137 141 143 144

CHAPTER 5

Contents

vii 146 148 148

5.7 5.8 5.9

Getting Access Help Summary Exercises

CHAPTER 6
6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 6.10 6.11 6.12

Access Tables: Building Data Foundations


Introduction Hands-On Tutorial: Creating Access Tables in the Datasheet View Hands-On Tutorial: Creating Access Tables in the Design View Field Data Types Field Properties The Lookup Wizard Defining a Primary Key Creating Access Tables by Using Import Wizard Working with Table Properties In-Class Assignment Summary Exercises

149
150 151 153 154 155 161 164 165 166 167 167 168

CHAPTER 7
7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8

Relationships: Linking Access Tables


Introduction Defining Relationships in the Relationships Window Types of Relationships Hands-On Tutorial: Defining Relationships in Access Working with Existing Relationships In-Class Assignment Summary Exercises

175
176 177 182 183 184 185 185 185

CHAPTER 8
8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 8.10 8.11 8.12 8.13 8.14 8.15 8.16

Queries: Building Application Foundations


Introduction Working with Select Queries Queries with Multiple Tables (The Join Operation) Working with Operators Hands-On Tutorial: A Select Query with Join of Multiple Tables Using Total Row (The GroupBy Operation) Creating Calculated Fields Parameter Queries Crosstab Queries Action Queries Update Queries Delete Queries Append Queries In-Class Assignment Summary Exercises

189
190 191 197 200 201 203 206 208 210 212 213 216 218 219 220 220

viii

Contents

CHAPTER 9
9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9 9.10 9.11

SQL: Creating and Processing RDBs


Introduction Types of SQL Statements The Data Definition Language (DDL) The Data Manipulation Language (DML) The SELECT Statement The INSERT Statement The DELETE Statement The UPDATE Statement Summary In-Class Assignment Exercises

231
232 232 233 236 236 244 245 245 246 247 247

PART THREE

Windows Application Development with VB .NET


Introduction to Visual Studio
Introduction Exploring Visual Studio IDE Visual Studio IDE Windows Object-Naming Conventions A Look at the VB .NETs Code Window The Object Browser In-Class Assignment Summary Exercises 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9

255
257
258 258 261 268 268 271 272 273 273

CHAPTER 10

CHAPTER 11
11.1 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.10 11.11 11.12 11.13 11.14

Visual Basic .NET Programming Language


Introduction Visual Basic Statements InputBox and MessageBox Visual Basic Data Types Adding Windows Forms and Setting a Start-up Form Control Structures Arithmetic, Logical, and String Operators Arrays Multi-Dimensional Arrays Dynamic Arrays Code Debugging In-Class Assignment Summary Exercises

275
276 276 278 282 285 286 300 304 308 311 312 316 316 317

Contents

ix

CHAPTER 12
12.1 12.2 12.3 12.4 12.5 12.6 12.7 12.8 12.9 12.10 12.11

Objects and Procedures


Introduction Procedures Subroutine Procedures Function Procedures Visual Basic Modules Visual Basic Classes Navigating Through Application Forms Exception Handling In-Class Assignment Summary Exercises

321
322 322 324 327 331 334 337 338 343 343 344

CHAPTER 13
13.1 13.2 13.3 13.4 13.5 13.6 13.7 13.8 13.9 13.10 13.11 13.12 13.13 13.14 13.15 13.16

Windows Forms and Controls


Introduction The Controls The Label and LinkLabel Controls The TextBox Control: In Depth The Button Control The CheckBox Control The ListBox Control: In Depth The ComboBox Control The CheckedListBox Control The DateTimePicker Control The TreeView Control Arranging Controls on a Form The Start-up Object In-Class Assignment Summary Exercises

349
350 350 353 354 356 357 359 361 363 366 368 369 370 371 371 372

CHAPTER 14
14.1 14.2 14.3 14.4 14.5 14.6 14.7 14.8 14.9 14.10 14.11

Database Connectivity with ADO .NET


Introduction Database Applications Overview Hands-On Tutorial: Creating a Simple Database Application Auto-Generated Objects in the Component Tray Hands-On Tutorial: Displaying Data in Individual Windows Controls Hands-On Tutorial: Binding Data to Existing Controls Hands-On Tutorial: Displaying Related Data on a Windows Form DataGridView Control Hands-On Tutorial: Creating a Search Form The Query Builder Hands-On Tutorial: Creating a Lookup Table

377
378 378 380 387 388 391 392 396 398 403 403

Contents

14.12 14.13 14.14 14.15

Data Binding Properties of a ComboBox Control In-Class Assignment Summary Exercises

406 406 407 407

CHAPTER 15
15.1 15.2 15.3 15.4 15.5 15.6 15.7 15.8 15.9 15.10 15.11 15.12 15.13

Advance Topics in Database Connectivity


Introduction ADO .NET Architecture A Database Connection Hands-On Tutorial: Displaying Data on a Form with Multiple Parameters Hands-On Tutorial: Displaying Data on a Form from Join of Multiple Tables Hands-On Tutorial: Displaying Data Using Existing MS Access Query Hands-On Tutorial: Passing Data between Forms in a Windows Application DataSets Inserts, Updates, and Deletes in a Windows Application Hands-On Tutorial: Updating Changes to Multiple Tables in the Database In-Class Assignment Summary Exercises

411
412 412 413 417 423 426 428 432 435 440 443 443 444

CHAPTER 16
16.1 16.2 16.3 16.4 16.5 16.6 16.7 16.8 16.9 16.10 16.11

Crystal Reports
Introduction Crystal Report Primer: A Simple Student Report Crystal Report Sections Customizing Reports: Exploring the Design Environment Properties of a CrystalReportViewer Control Hands-On Tutorial: Creating a Pie Chart to Display Faculty Salaries Hands-On Tutorial: Creating a Crystal Report Based on Multiple Tables Hands-On Tutorial: Creating Parameterized Crystal Reports In-Class Assignments Summary Exercises

447
448 449 460 461 463 464 467 472 476 476 476

PART FOUR

Web Application Development with ASP .NET


Web Introduction and Essential HTML
Introduction Internet, Web, and Related Terminologies HyperText Markup Language (HTML) Essential Text Formatting 17.1 17.2 17.3 17.4

479
481
482 482 484 487

CHAPTER 17

Contents

xi 493 494 495 496 498 499 502 503 503

17.5 17.6 17.7 17.8 17.9 17.10 17.11 17.12 17.13

HTML Hyperlinks Page Backgrounds Adding Graphics to Web Pages Structuring Web Pages Using HTML Tables Using Visual Studios Design View: WYSIWYG Web Form and HTML Controls In-Class Assignments Summary Exercises

CHAPTER 18
18.1 18.2 18.3 18.4 18.5 18.6 18.7 18.8 18.9 18.10 18.11 18.12

Introduction to ASP .NET


Introduction ASP.NET Primer: Sum of N Numbers Hands-On Tutorial: Currency Conversion Example Extending the Currency Conversion Example The AutoPostBack Property Using the Page_Load Event and IsPostBack Property Working with the Page Directive Validation Controls Passing Parameters through URL User-Defined Controls In-Class Assignments Summary Exercises

505
506 506 509 511 515 517 518 522 523 527 527 528

CHAPTER 19
19.1 19.2 19.3 19.4 19.5 19.6 19.7 19.8 19.9 19.10 19.11 19.12 19.13 19.14 19.15

Database Connectivity in Web Applications


Introduction Connecting to the Access Database Using the Server Explorer Window Hands-On Tutorial: Displaying Data on a Web Page Reconfiguring SQL Query in an AccessDataSource Paging, Sorting, and Data Manipulation in a GridView Control Hands-On Tutorial: Displaying Data on a Web Page from a Query with a Join of Multiple Tables Hands-On Tutorial: Displaying Data-Bind Images in a GridView Control Hands-On Tutorial: Adding Lookup and Filter Functionalities to a Web Page Hands-On Tutorial: Displaying Related Data in a DetailsView Control Hands-On Tutorial: Working with the Repeater Control Web-Based Crystal Reports Programmatically Accessing the Database In-Class Assignment Summary Exercises

531
532 532 535 536 540 542 545 548 552 557 560 567 569 570 570

xii

Contents

PART FIVE

Case Studies
Online Book Store
Introduction Application Functionalities and Assumptions The Master Page The Index Page The Shopping Cart Page The Login Page The Checkout Page Summary Extensions CS1.1 CS1.2 CS1.3 CS1.4 CS1.5 CS1.6 CS1.7 CS1.14 CS1.15

573
575
576 576 578 580 589 595 595 598 598

CASE STUDY 1

CASE STUDY 2
CS2.1 CS2.2 CS2.3 CS2.4 CS2.5 CS2.6 CS2.7 CS2.8 CS2.9 CS2.10 CS2.11

Portfolio Management and Optimization


Introduction Application Functionalities and Assumptions The Master Page The Index Page The Personal Information Page The Stock Comparison Page The Portal Page Portfolio Operations The Optimization Page Summary Extensions

599
600 600 602 604 604 606 609 610 615 620 620

CASE STUDY 3
CS3.1 CS3.2 CS3.3 CS3.4 CS3.5 CS3.6 CS3.7

Television Advertisement Allocation


Introduction Application Functionalities The Channel Information and Program Information Pages The Customer Preferences Form The Advertisement Allocation Page Summary Extensions

621
622 623 624 632 633 636 636

CASE STUDY 4
CS4.1 CS4.2 CS4.3 CS4.4 CS4.5 CS4.6 CS4.7 CS4.8 CS4.9

Voyage Prophesy
Introduction Application Functionalities The Startup Form, User Controls, and MapPoint Reference The Search Form The Show Map Form The DriveIt Form The Direction Form Summary Extensions

639
640 640 641 645 647 650 651 652 653

Contents

xiii

CASE STUDY 5
CS5.1 CS5.2 CS5.3 CS5.4 CS5.5 CS5.6 CS5.7 CS5.8 CS5.9 CS5.10

ADO .NET and MS Excel


Introduction Forecasting Methods: Background and Theory Forecasting Methods: Application Functionalities and Assumptions Setting up the Parameter Input Form and the Excel Sheet The Code Behind the Parameter Input Form Dynamic Production Problem (DPP) Application DPP: Setting up the Parameter Input Form and the Excel Sheet DPP: The Code Behind the Parameter Input Form Summary Application Extensions REFERENCES ABOUT THE AUTHORS INDEX

655
656 656 658 658 661 666 667 669 674 674 675 677 679

You might also like